diff options
author | ache <ache@FreeBSD.org> | 2007-03-29 10:55:33 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2007-03-29 10:55:33 +0000 |
commit | ac125ddc4f3588ec7591fd3f809bcdbb33c75aec (patch) | |
tree | 724ef05fd7710bbccb522c8afbdf37d061b2f73c /etc | |
parent | 38ebab58b2d528765bfda095aed950866c326d5f (diff) | |
download | FreeBSD-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.subr | 2 |
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 |