diff options
author | Roy Marples <roy@marples.name> | 2007-05-08 16:52:26 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-05-08 16:52:26 +0000 |
commit | 0888f74f473f3e4b83de5f04b0b4cbb4b8dbc7f9 (patch) | |
tree | ef0ebfed96315be4906b1b4dd6c19ca919fbba8d /net.Linux/ifconfig.sh | |
parent | ea28d7e78d5155b46bf76b3e95109666db0ef0ba (diff) |
When we don't have an address return 1, #176577.
Diffstat (limited to 'net.Linux/ifconfig.sh')
-rw-r--r-- | net.Linux/ifconfig.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net.Linux/ifconfig.sh b/net.Linux/ifconfig.sh index 68590bbe..0bd5da29 100644 --- a/net.Linux/ifconfig.sh +++ b/net.Linux/ifconfig.sh @@ -61,6 +61,8 @@ _set_mac_address() { _get_inet_address() { set -- $(LC_ALL=C ifconfig "${IFACE}" | sed -n -e 's/.*inet addr:\([^ ]*\).*Mask:\([^ ]*\).*/\1 \2/p') + [ -z "$1" ] && return 1 + echo -n "$1" shift echo "/$(_netmask2cidr "$1")" |