Date: Fri, 21 Dec 2012 20:11:41 +0000 (UTC) From: Devin Teske <dteske@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244554 - in head/usr.sbin/bsdconfig: networking/share share Message-ID: <201212212011.qBLKBfC2028995@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dteske Date: Fri Dec 21 20:11:41 2012 New Revision: 244554 URL: http://svnweb.freebsd.org/changeset/base/244554 Log: Use f_show_help() where printf(1) syntax is desired. Modified: head/usr.sbin/bsdconfig/networking/share/device.subr head/usr.sbin/bsdconfig/networking/share/hostname.subr head/usr.sbin/bsdconfig/networking/share/ipaddr.subr head/usr.sbin/bsdconfig/networking/share/media.subr head/usr.sbin/bsdconfig/networking/share/netmask.subr head/usr.sbin/bsdconfig/networking/share/routing.subr head/usr.sbin/bsdconfig/share/mustberoot.subr Modified: head/usr.sbin/bsdconfig/networking/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/device.subr Fri Dec 21 20:01:13 2012 (r244553) +++ head/usr.sbin/bsdconfig/networking/share/device.subr Fri Dec 21 20:11:41 2012 (r244554) @@ -378,11 +378,7 @@ f_dialog_menu_netdev_edit() if f_nfs_mounted && ! f_jailed; then local setting="$( printf "$msg_current_dhcp_status" \ "$interface" "$dhcp_status" )" - local message="$( - printf "$msg_nfs_mounts_may_cause_hang" \ - "$setting" - )" - f_dialog_msgbox "$message" + f_show_msg "$msg_nfs_mounts_may_cause_hang" "$setting" continue fi Modified: head/usr.sbin/bsdconfig/networking/share/hostname.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/hostname.subr Fri Dec 21 20:01:13 2012 (r244553) +++ head/usr.sbin/bsdconfig/networking/share/hostname.subr Fri Dec 21 20:11:41 2012 (r244554) @@ -101,16 +101,11 @@ f_dialog_validate_hostname() # local retval=$? case $retval in - 1) f_dialog_msgbox "$( printf \ - "$msg_hostname_label_contains_invalid_chars" "$fqhn" )";; - 2) f_dialog_msgbox "$( printf \ - "$msg_hostname_label_starts_or_ends_with_hyphen" "$fqhn" )";; - 3) f_dialog_msgbox "$( printf \ - "$msg_hostname_label_is_null" "$fqhn" )";; - 63) f_dialog_msgbox "$( printf \ - "$msg_hostname_label_exceeds_max_length" "$fqhn" )";; - 255) f_dialog_msgbox "$( printf \ - "$msg_hostname_exceeds_max_length" "$fqhn" )";; + 1) f_show_msg "$msg_hostname_label_contains_invalid_chars" "$fqhn";; + 2) f_show_msg "$msg_hostname_label_starts_or_ends_with_hyphen" "$fqhn";; + 3) f_show_msg "$msg_hostname_label_is_null" "$fqhn";; + 63) f_show_msg "$msg_hostname_label_exceeds_max_length" "$fqhn";; + 255) f_show_msg "$msg_hostname_exceeds_max_length" "$fqhn";; esac return $retval @@ -169,10 +164,8 @@ f_dialog_input_hostname() # "X11 connection rejected because of wrong authentication." # if [ "$USE_XDIALOG" -a "$SSH_CONNECTION" ]; then - f_dialog_msgbox "$( - printf "$msg_activate_hostname_x11warning" \ - "$( hostname )" "$hostname" - )" + f_show_msg "$msg_activate_hostname_x11warning" \ + "$( hostname )" "$hostname" else f_dialog_yesno "$( printf "$msg_activate_hostname" \ Modified: head/usr.sbin/bsdconfig/networking/share/ipaddr.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/ipaddr.subr Fri Dec 21 20:01:13 2012 (r244553) +++ head/usr.sbin/bsdconfig/networking/share/ipaddr.subr Fri Dec 21 20:11:41 2012 (r244554) @@ -116,14 +116,10 @@ f_dialog_iperror() [ ${error:-0} -ne 0 ] || return $SUCCESS case "$error" in - 1) f_dialog_msgbox "$( printf \ - "$msg_ipv4_addr_octet_contains_invalid_chars" "$ip" )";; - 2) f_dialog_msgbox "$( printf \ - "$msg_ipv4_addr_octet_is_null" "$ip" )";; - 3) f_dialog_msgbox "$( printf \ - "$msg_ipv4_addr_octet_exceeds_max_value" "$ip" )";; - 4) f_dialog_msgbox "$( printf \ - "$msg_ipv4_addr_octet_missing_or_extra" "$ip" )";; + 1) f_show_msg "$msg_ipv4_addr_octet_contains_invalid_chars" "$ip";; + 2) f_show_msg "$msg_ipv4_addr_octet_is_null" "$ip";; + 3) f_show_msg "$msg_ipv4_addr_octet_exceeds_max_value" "$ip";; + 4) f_show_msg "$msg_ipv4_addr_octet_missing_or_extra" "$ip";; esac } @@ -294,14 +290,10 @@ f_dialog_ip6error() [ ${error:-0} -ne 0 ] || return $SUCCESS case "$error" in - 1) f_dialog_msgbox "$( printf \ - "$msg_ipv6_addr_segment_contains_invalid_chars" "$ip" )";; - 2) f_dialog_msgbox "$( printf \ - "$msg_ipv6_addr_too_many_null_segments" "$ip" )";; - 3) f_dialog_msgbox "$( printf \ - "$msg_ipv6_addr_segment_contains_too_many_chars" "$ip" )";; - 4) f_dialog_msgbox "$( printf \ - "$msg_ipv6_addr_too_few_or_extra_segments" "$ip" )";; + 1) f_show_msg "$msg_ipv6_addr_segment_contains_invalid_chars" "$ip";; + 2) f_show_msg "$msg_ipv6_addr_too_many_null_segments" "$ip";; + 3) f_show_msg "$msg_ipv6_addr_segment_contains_too_many_chars" "$ip";; + 4) f_show_msg "$msg_ipv6_addr_too_few_or_extra_segments" "$ip";; *) if [ $(( $error & 0xF )) -eq 5 ]; then # IPv4 at the end of IPv6 address is invalid @@ -353,9 +345,7 @@ f_dialog_input_ipaddr() if f_nfs_mounted && ! f_jailed; then local setting="$( printf "$msg_current_ipaddr" \ "$interface" "$_ipaddr" )" - local message="$( printf "$msg_nfs_mounts_may_cause_hang" \ - "$setting" )" - f_dialog_msgbox "$message" + f_show_msg "$msg_nfs_mounts_may_cause_hang" "$setting" return $FAILURE fi Modified: head/usr.sbin/bsdconfig/networking/share/media.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/media.subr Fri Dec 21 20:01:13 2012 (r244553) +++ head/usr.sbin/bsdconfig/networking/share/media.subr Fri Dec 21 20:11:41 2012 (r244554) @@ -114,9 +114,7 @@ f_dialog_input_options() if f_nfs_mounted && ! f_jailed; then local setting="$( printf "$msg_current_options" \ "$interface" "$options" )" - local message="$( printf "$msg_nfs_mounts_may_cause_hang" \ - "$setting" )" - f_dialog_msgbox "$message" + f_show_msg "$msg_nfs_mounts_may_cause_hang" "$setting" return $FAILURE fi @@ -165,9 +163,7 @@ f_dialog_menu_media_options() if f_nfs_mounted && ! f_jailed; then local setting="$( printf "$msg_current_options" \ "$interface" "$_options" )" - local message="$( printf "$msg_nfs_mounts_may_cause_hang" \ - "$setting" )" - f_dialog_msgbox "$message" + f_show_msg "$msg_nfs_mounts_may_cause_hang" "$setting" return $FAILURE fi Modified: head/usr.sbin/bsdconfig/networking/share/netmask.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/netmask.subr Fri Dec 21 20:01:13 2012 (r244553) +++ head/usr.sbin/bsdconfig/networking/share/netmask.subr Fri Dec 21 20:11:41 2012 (r244554) @@ -127,16 +127,11 @@ f_dialog_validate_netmask() # local retval=$? case $retval in - 1) f_dialog_msgbox "$( printf \ - "$msg_ipv4_mask_field_contains_invalid_chars" "$mask" )";; - 2) f_dialog_msgbox "$( printf \ - "$msg_ipv4_mask_field_is_null" "$mask" )";; - 3) f_dialog_msgbox "$( printf \ - "$msg_ipv4_mask_field_exceeds_max_value" "$mask" )";; - 4) f_dialog_msgbox "$( printf \ - "$msg_ipv4_mask_field_missing_or_extra" "$mask" )";; - 5) f_dialog_msgbox "$( printf \ - "$msg_ipv4_mask_field_invalid_value" "$mask" )";; + 1) f_show_msg "$msg_ipv4_mask_field_contains_invalid_chars" "$mask";; + 2) f_show_msg "$msg_ipv4_mask_field_is_null" "$mask";; + 3) f_show_msg "$msg_ipv4_mask_field_exceeds_max_value" "$mask";; + 4) f_show_msg "$msg_ipv4_mask_field_missing_or_extra" "$mask";; + 5) f_show_msg "$msg_ipv4_mask_field_invalid_value" "$mask";; esac return $retval @@ -158,9 +153,7 @@ f_dialog_input_netmask() if f_nfs_mounted && ! f_jailed; then local setting="$( printf "$msg_current_subnet" \ "$interface" "$_netmask" )" - local message="$( printf "$msg_nfs_mounts_may_cause_hang" \ - "$setting" )" - f_dialog_msgbox "$message" + f_show_msg "$msg_nfs_mounts_may_cause_hang" "$setting" return $FAILURE fi Modified: head/usr.sbin/bsdconfig/networking/share/routing.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/routing.subr Fri Dec 21 20:01:13 2012 (r244553) +++ head/usr.sbin/bsdconfig/networking/share/routing.subr Fri Dec 21 20:11:41 2012 (r244554) @@ -91,9 +91,7 @@ f_dialog_input_defaultrouter() if f_nfs_mounted && ! f_jailed; then local setting="$( printf "$msg_current_default_router" \ "$defaultrouter" )" - local message="$( printf "$msg_nfs_mounts_may_cause_hang" \ - "$setting" )" - f_dialog_msgbox "$message" + f_show_msg "$msg_nfs_mounts_may_cause_hang" "$setting" return $FAILURE fi Modified: head/usr.sbin/bsdconfig/share/mustberoot.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/mustberoot.subr Fri Dec 21 20:01:13 2012 (r244553) +++ head/usr.sbin/bsdconfig/share/mustberoot.subr Fri Dec 21 20:11:41 2012 (r244554) @@ -338,16 +338,14 @@ f_authenticate_some_user() case "$user" in root|toor) nfailures=$(( $nfailures + 1 )) - f_dialog_msgbox "$( printf \ - "$msg_user_disallowed" "$user" )" + f_show_msg "$msg_user_disallowed" "$user" continue esac fi if ! f_quietly id "$user"; then nfailures=$(( $nfailures + 1 )) if [ "$SECURE_DIVULGE_UNKNOWN_USER" ]; then - f_dialog_msgbox "$( printf \ - "$msg_unknown_user" "$user" )" + f_show_msg "$msg_unknown_user" "$user" elif [ $nfailures -lt $PASSWD_TRIES ]; then f_dialog_info "$msg_sorry_try_again" sleep 1
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212212011.qBLKBfC2028995>