diff options
author | dteske <dteske@FreeBSD.org> | 2013-07-05 16:00:01 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2013-07-05 16:00:01 +0000 |
commit | 0ac55ea171e6d82b0acc861ebcb19fb4db4958c4 (patch) | |
tree | 20324385a5f53dae148a2e6fa863df76ea68f69d /usr.sbin/bsdconfig/share/media/tcpip.subr | |
parent | 1523d4a961431261ec396302c4112265ef2003c7 (diff) | |
download | FreeBSD-src-0ac55ea171e6d82b0acc861ebcb19fb4db4958c4.zip FreeBSD-src-0ac55ea171e6d82b0acc861ebcb19fb4db4958c4.tar.gz |
Use f_show_msg() instead of f_dialog_msgbox() where appropriate. The main
difference between these two functions:
Usage: f_show_msg() $format_string [ $format_args ... ]
Usage: f_dialog_msgbox() $text [ $hline ]
The former lends itself well to displaying the $msg_* i18n text, prompts,
etc. While the latter is better for text you do not control (error strings
captured as a response from external commands) -- or if you have to control
the hline.
Diffstat (limited to 'usr.sbin/bsdconfig/share/media/tcpip.subr')
-rw-r--r-- | usr.sbin/bsdconfig/share/media/tcpip.subr | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/bsdconfig/share/media/tcpip.subr b/usr.sbin/bsdconfig/share/media/tcpip.subr index 0daada6..8cb02bc 100644 --- a/usr.sbin/bsdconfig/share/media/tcpip.subr +++ b/usr.sbin/bsdconfig/share/media/tcpip.subr @@ -456,20 +456,20 @@ f_dialog_validate_tcpip() local ipnum masknum if [ ! "$hostname" ]; then - f_dialog_msgbox "$msg_must_specify_a_host_name_of_some_sort" + f_show_msg "$msg_must_specify_a_host_name_of_some_sort" elif ! f_validate_hostname "$hostname"; then - f_dialog_msgbox "$msg_invalid_hostname_value" + f_show_msg "$msg_invalid_hostname_value" elif [ "$netmask" ] && ! f_validate_netmask "$netmask"; then - f_dialog_msgbox "$msg_invalid_netmask_value" + f_show_msg "$msg_invalid_netmask_value" elif [ "$nameserver" ] && - ! f_validate_ipaddr "$nameserver" && - ! f_validate_ipaddr6 "$nameserver"; then - f_dialog_msgbox "$msg_invalid_name_server_ip_address_specified" + ! f_validate_ipaddr "$nameserver" && + ! f_validate_ipaddr6 "$nameserver"; then + f_show_msg "$msg_invalid_name_server_ip_address_specified" elif [ "$ipaddr" ] && ! f_validate_ipaddr "$ipaddr" "$netmask"; then - f_dialog_msgbox "$msg_invalid_ipv4_address" + f_show_msg "$msg_invalid_ipv4_address" elif [ "$gateway" -a "$gateway" != "NO" ] && - ! f_validate_gateway "$gateway" "$ipaddr" "$netmask"; then - f_dialog_msgbox "$msg_invalid_gateway_ipv4_address_specified" + ! f_validate_gateway "$gateway" "$ipaddr" "$netmask"; then + f_show_msg "$msg_invalid_gateway_ipv4_address_specified" else return $SUCCESS fi @@ -1264,7 +1264,7 @@ f_device_dialog_tcp() if f_netinteractive || f_interactive || [ ! "$_hostname" ] then [ ! "$_hostname" ] && f_interactive && - f_dialog_msgbox "$msg_hostname_variable_not_set" + f_show_msg "$msg_hostname_variable_not_set" local title=" $msg_network_configuration " local hline="$hline_alnum_arrows_punc_tab_enter" @@ -1593,7 +1593,7 @@ f_device_select_tcp() fi done - f_interactive && f_dialog_msgbox "$msg_no_network_devices" + f_interactive && f_show_msg "$msg_no_network_devices" return $FAILURE fi # $network_dev @@ -1616,7 +1616,7 @@ f_device_select_tcp() local retval=$SUCCESS if [ ${cnt:=0} -eq 0 ]; then - f_dialog_msgbox "$msg_no_network_devices" + f_show_msg "$msg_no_network_devices" retval=$FAILURE elif [ $cnt -eq 1 ]; then f_device_dialog_tcp $dev |