summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2007-03-29 10:55:33 +0000
committerache <ache@FreeBSD.org>2007-03-29 10:55:33 +0000
commitac125ddc4f3588ec7591fd3f809bcdbb33c75aec (patch)
tree724ef05fd7710bbccb522c8afbdf37d061b2f73c /etc
parent38ebab58b2d528765bfda095aed950866c326d5f (diff)
downloadFreeBSD-src-ac125ddc4f3588ec7591fd3f809bcdbb33c75aec.zip
FreeBSD-src-ac125ddc4f3588ec7591fd3f809bcdbb33c75aec.tar.gz
Fix get_if_var() with 3 args (i.e. with default)
All xxx_<ifname> flags are set to empty strings automatically earlier so eval echo \${${prefix}${_if}${suffix}-${_default}} not substitute the default but return just the empty string. Fix it using eval echo \${${prefix}${_if}${suffix}:-${_default}} (i.e. treat empty strings as unset) The bug manifistates itself with the following warning from checkyesno(): /etc/rc.d/dhclient: WARNING: $background_dhclient is not set properly - see rc.conf(5)
Diffstat (limited to 'etc')
-rw-r--r--etc/network.subr2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/network.subr b/etc/network.subr
index c221115..b6e4a66 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -118,7 +118,7 @@ get_if_var()
prefix=${_var%%IF*}
suffix=${_var##*IF}
- eval echo \${${prefix}${_if}${suffix}-${_default}}
+ eval echo \${${prefix}${_if}${suffix}:-${_default}}
}
# _ifconfig_getargs if
OpenPOWER on IntegriCloud