When we don't have an address return 1, #176577.

This commit is contained in:
Roy Marples
2007-05-08 16:52:26 +00:00
parent ea28d7e78d
commit 0888f74f47
3 changed files with 8 additions and 1 deletions

View File

@@ -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")"