summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2013-06-02 22:54:36 +0000
committerdteske <dteske@FreeBSD.org>2013-06-02 22:54:36 +0000
commit2bc44622b32aef394738ad93136b00957473e965 (patch)
tree260b42a9f6da7f0acdf57ec3107cd517d9ef361c /usr.sbin
parent6ece0c7e999f8c856e9208c95b80e3aa1562815b (diff)
downloadFreeBSD-src-2bc44622b32aef394738ad93136b00957473e965.zip
FreeBSD-src-2bc44622b32aef394738ad93136b00957473e965.tar.gz
Use f_isset() (introduced by r250317) instead of `f_quietly f_getvar ...'.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bsdconfig/share/media/nfs.subr5
-rw-r--r--usr.sbin/bsdconfig/share/media/tcpip.subr12
-rwxr-xr-xusr.sbin/bsdconfig/share/packages/categories.subr2
3 files changed, 10 insertions, 9 deletions
diff --git a/usr.sbin/bsdconfig/share/media/nfs.subr b/usr.sbin/bsdconfig/share/media/nfs.subr
index 461db1c..d78dec6 100644
--- a/usr.sbin/bsdconfig/share/media/nfs.subr
+++ b/usr.sbin/bsdconfig/share/media/nfs.subr
@@ -103,9 +103,8 @@ f_media_set_nfs()
f_dprintf "%s: $msg_net_device_init_failed\n" f_media_set_nfs
local hostname="${nfs%%:*}"
- if f_quietly f_getvar $VAR_NAMESERVER && ! {
- f_validate_ipaddr "$hostname" ||
- f_validate_ipaddr6 "$hostname"
+ if f_isset $VAR_NAMESERVER && ! {
+ f_validate_ipaddr "$hostname" || f_validate_ipaddr6 "$hostname"
}; then
f_show_info "$msg_looking_up_host" "$hostname"
f_dprintf "%s Looking up hostname, %s, using host(1)" \
diff --git a/usr.sbin/bsdconfig/share/media/tcpip.subr b/usr.sbin/bsdconfig/share/media/tcpip.subr
index b7b7b7e..f1664f2 100644
--- a/usr.sbin/bsdconfig/share/media/tcpip.subr
+++ b/usr.sbin/bsdconfig/share/media/tcpip.subr
@@ -1133,11 +1133,12 @@ f_device_dialog_tcp()
# Otherwise, ask the question interactively.
#
local try6
- if ! f_quietly f_getvar $VAR_NO_INET6 && {
+ if ! f_isset $VAR_NO_INET6 && {
{ f_getvar $VAR_TRY_RTSOL try6 && [ "$try6" = "YES" ]; } ||
{
- ! f_quietly f_getvar $VAR_TRY_RTSOL &&
- f_dialog_noyes "$msg_try_ipv6_configuration"
+ # Only prompt the user when VAR_TRY_RTSOL is unset
+ ! f_isset $VAR_TRY_RTSOL &&
+ f_dialog_noyes "$msg_try_ipv6_configuration"
}
}; then
local i
@@ -1169,8 +1170,9 @@ f_device_dialog_tcp()
#
local try4
if { f_getvar $VAR_TRY_DHCP try4 && [ "$try4" = "YES" ]; } || {
- ! f_quietly f_getvar $VAR_TRY_DHCP &&
- f_dialog_noyes "$msg_try_dhcp_configuration"
+ # Only prompt the user when VAR_TRY_DHCP is unset
+ ! f_isset $VAR_TRY_DHCP &&
+ f_dialog_noyes "$msg_try_dhcp_configuration"
}; then
f_quietly ifconfig $dev delete
f_quietly mkdir -p /var/db
diff --git a/usr.sbin/bsdconfig/share/packages/categories.subr b/usr.sbin/bsdconfig/share/packages/categories.subr
index 2534516..6c35431 100755
--- a/usr.sbin/bsdconfig/share/packages/categories.subr
+++ b/usr.sbin/bsdconfig/share/packages/categories.subr
@@ -83,7 +83,7 @@ f_category_desc_set()
for cat in $CATEGORIES; do
[ "$cat" = "$category" ] || continue
f_str2varname $cat varcat
- f_quietly f_getvar _category_$varcat || continue
+ f_isset _category_$varcat || continue
found=1 && break
done
if [ ! "$found" ]; then
OpenPOWER on IntegriCloud