summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdconfig/networking
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2013-01-14 01:15:25 +0000
committerdteske <dteske@FreeBSD.org>2013-01-14 01:15:25 +0000
commit45e98a4654e7a3deac741a3a873b469ed7a4749f (patch)
tree0f65dea73465a2671b9fc5fb0dcfa1af5f5397df /usr.sbin/bsdconfig/networking
parent1e25b1497aa9e77e4c8fee7c7ea8d0fbc28960a4 (diff)
downloadFreeBSD-src-45e98a4654e7a3deac741a3a873b469ed7a4749f.zip
FreeBSD-src-45e98a4654e7a3deac741a3a873b469ed7a4749f.tar.gz
Add new f_yesno/f_noyes wrapper functions (which take printf(1) syntax).
Diffstat (limited to 'usr.sbin/bsdconfig/networking')
-rw-r--r--usr.sbin/bsdconfig/networking/share/device.subr5
-rw-r--r--usr.sbin/bsdconfig/networking/share/hostname.subr6
-rw-r--r--usr.sbin/bsdconfig/networking/share/routing.subr7
3 files changed, 6 insertions, 12 deletions
diff --git a/usr.sbin/bsdconfig/networking/share/device.subr b/usr.sbin/bsdconfig/networking/share/device.subr
index bf44768..23ac83b 100644
--- a/usr.sbin/bsdconfig/networking/share/device.subr
+++ b/usr.sbin/bsdconfig/networking/share/device.subr
@@ -456,9 +456,8 @@ f_dialog_menu_netdev_edit()
# Re/Apply the settings if desired
#
if [ ! "$dhcp" ]; then
- f_dialog_yesno "Would you like to bring the $interface" \
- "interface up right now?"
- if [ $? -eq $SUCCESS ]; then
+ if f_yesno "$msg_bring_interface_up" "$interface"
+ then
f_show_info "$msg_bring_interface_up" "$interface"
local dr="$( f_sysrc_get defaultrouter )" err
diff --git a/usr.sbin/bsdconfig/networking/share/hostname.subr b/usr.sbin/bsdconfig/networking/share/hostname.subr
index 959c7df..b276059 100644
--- a/usr.sbin/bsdconfig/networking/share/hostname.subr
+++ b/usr.sbin/bsdconfig/networking/share/hostname.subr
@@ -201,10 +201,8 @@ f_dialog_input_hostname()
f_show_msg "$msg_activate_hostname_x11warning" \
"$( hostname )" "$hostname"
else
- f_dialog_yesno "$(
- printf "$msg_activate_hostname" \
- "$( hostname )" "$hostname" \
- )" \
+ f_yesno "$msg_activate_hostname" \
+ "$( hostname )" "$hostname" \
&& hostname "$hostname"
fi
fi
diff --git a/usr.sbin/bsdconfig/networking/share/routing.subr b/usr.sbin/bsdconfig/networking/share/routing.subr
index 3990c03..4207ab2 100644
--- a/usr.sbin/bsdconfig/networking/share/routing.subr
+++ b/usr.sbin/bsdconfig/networking/share/routing.subr
@@ -129,11 +129,8 @@ f_dialog_input_defaultrouter()
#
if [ "$( f_route_get_default )" != "$defaultrouter" ]; then
f_dialog_clear
- f_dialog_yesno "$(
- printf "$msg_activate_default_router" \
- "$( f_route_get_default )" "$defaultrouter"
- )"
-
+ f_yesno "$msg_activate_default_router" \
+ "$( f_route_get_default )" "$defaultrouter"
if [ $? -eq $SUCCESS ]; then
local err
OpenPOWER on IntegriCloud