When we don't have an address return 1, #176577.
This commit is contained in:
parent
ea28d7e78d
commit
0888f74f47
@ -1,6 +1,10 @@
|
|||||||
# ChangeLog for Gentoo System Intialization ("rc") scripts
|
# ChangeLog for Gentoo System Intialization ("rc") scripts
|
||||||
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPLv2
|
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPLv2
|
||||||
|
|
||||||
|
08 May 2007; Roy Marples <uberlord@gentoo.org>:
|
||||||
|
|
||||||
|
When we don't have an address return 1, #176577.
|
||||||
|
|
||||||
05 May 2007; Roy Marples <uberlord@gentoo.org>:
|
05 May 2007; Roy Marples <uberlord@gentoo.org>:
|
||||||
|
|
||||||
Fix KV_to_int working with funky kernel versions, #177197.
|
Fix KV_to_int working with funky kernel versions, #177197.
|
||||||
|
@ -51,9 +51,10 @@ _is_wireless() {
|
|||||||
_get_inet_address() {
|
_get_inet_address() {
|
||||||
set -- $(LC_ALL=C ifconfig "${IFACE}" |
|
set -- $(LC_ALL=C ifconfig "${IFACE}" |
|
||||||
sed -n -e 's/^[[:space:]]*inet \([^ ]*\) netmask 0x\(..\)\(..\)\(..\)\(..\).*/\1 0x\2.0x\3.0x\4/p')
|
sed -n -e 's/^[[:space:]]*inet \([^ ]*\) netmask 0x\(..\)\(..\)\(..\)\(..\).*/\1 0x\2.0x\3.0x\4/p')
|
||||||
|
[ -z "$1" ] && return 1
|
||||||
|
|
||||||
echo -n "$1"
|
echo -n "$1"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
echo "/$(_netmask2cidr "$1")"
|
echo "/$(_netmask2cidr "$1")"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,6 +61,8 @@ _set_mac_address() {
|
|||||||
_get_inet_address() {
|
_get_inet_address() {
|
||||||
set -- $(LC_ALL=C ifconfig "${IFACE}" |
|
set -- $(LC_ALL=C ifconfig "${IFACE}" |
|
||||||
sed -n -e 's/.*inet addr:\([^ ]*\).*Mask:\([^ ]*\).*/\1 \2/p')
|
sed -n -e 's/.*inet addr:\([^ ]*\).*Mask:\([^ ]*\).*/\1 \2/p')
|
||||||
|
[ -z "$1" ] && return 1
|
||||||
|
|
||||||
echo -n "$1"
|
echo -n "$1"
|
||||||
shift
|
shift
|
||||||
echo "/$(_netmask2cidr "$1")"
|
echo "/$(_netmask2cidr "$1")"
|
||||||
|
Loading…
Reference in New Issue
Block a user