Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Mar 2014 03:20:47 +0000 (UTC)
From:      Devin Teske <dteske@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r263791 - in stable/9: . usr.sbin/bsdconfig usr.sbin/bsdconfig/console usr.sbin/bsdconfig/console/include usr.sbin/bsdconfig/diskmgmt usr.sbin/bsdconfig/docsinstall usr.sbin/bsdconfig/d...
Message-ID:  <201403270320.s2R3Klqv045092@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dteske
Date: Thu Mar 27 03:20:47 2014
New Revision: 263791
URL: http://svnweb.freebsd.org/changeset/base/263791

Log:
  MFC revisions 253333,256181,256321-256323,256325,256330,256333,256335,
  256391,257755-257756,257780-257785,257787-257793,258029,258263,258266,
  258355,258360,258400-258401,258406-258407,258418,258430,258439,258458,
  258589-258590,258592,258727-258728,258785,259054,260894,260899,262895-
  262902,262904,262908-262910,262982,262984,263133-263137,263139,263141,
  263144-263150, and (partially) 263249 (76 revisions; summarized below)...
  r253333: Re-implement $probe_only aspect of f_media_get_TYPE()
  r256181: Centralized [X]dialog(1) exit codes added to `dialog.subr'
  r256321: Add support for obtaining the capacity of disks.
  r256322: Fix include statements in strings.subr
  r256323: Add USE_DIALOG global
  r256325: Add keymap.subr
  r256330: Fix f_dialog_*_constrain() to support NULL variable arguments
  r256333: Fixes and additions to `device.subr'
  r256335: Add f_expand_number() (shadowing expand_number(3))
  r256391: Fix signed integer overflow detection in f_expand_number()
  r257755: Update f_host_lookup() to support SRV records
  r257756: Fix spurious error message "f_media_shutdown_http: not found"
  r257780: Whitespace
  r257781: Make use of f_isset()
  r257782: Add DEBUG_INITIALIZE_FILE global boolean
  r257783: Add f_show_err() (like f_show_msg() but for errors)
  r257784: Add f_eval_catch() for debug and displaying errors automatically
  r257785: Fix dialog auto-sizing when running in a pipe-chain
  r257787: Fix a silly bug
  r257788: Add some helpful debugging
  r257789: Comments
  r257790: Fix a bug when using printf
  r257791: Add f_sprintf() and f_vsprintf()
  r257792: Comments
  r257793: Fix an off-by-one error
  r258029: Comments
  r258263: Move function name declarations/usages
  r258266: Always shutdown media and don't eject CDROM
  r258355: "Tim trailing" -> "Trim Trailing"
  r258360: Whitespace, style, sub-shells, and variable names
  r258400: Add new `includes' module for exploring the API
  r258401: Add `-d' flag [to includes module] for printing function descrs
  r258406: Make `-d' flag [of include module] implicitly enable `-f'
  r258407: Update function description for f_validate_hostname()
  r258418: Quote the interface name for good measure [in device.subr]
  r258430: Remove unused line [in device.subr] -- cruft from SVN r258360
  r258439: Fix command-line only modules [dot, includes] to not use f_die()
  r258458: Improve network device scanning
  r258589: Add missing `$' before `pgm' in syscons_ttys module
  r258590: Add missing newline [in includes module]
  r258592: Sort messages
  r258727: Fix display output issue with `includes' module
  r258728: Fix [another] display output issue with `includes' module
  r258785: Sort function output [from includes module] on name of function
  r259054: Performance and debugging enhancements
  r260894: Optimize f_expand_number() (submitted by Christoph Mallon)
  r260899: Dummy commit
  r262895: Allow dispatched reswords to carry arguments
  r262896: Add missing local declaration [in common.subr]
  r262897: Fix a type in a comment [in common.subr]
  r262898: Fix incorrect return status [from f_getvar() in common.subr]
  r262899: Make f_show_err() [of common.subr] non-fatal
  r262900: Centralize function name [in f_script_load() of script.subr]
  r262901: Prevent localization of __number in f_expand_number()
  r262902: Add a comment above f_replaceall() [of strings.subr]
  r262904: Rewrite groupmgmt -- hooking it into the scripting system
  r262908: Change dispatch words from group* to *Group for backward compat
  r262909: Fix copy/paste error in a comment [in goupadd module]
  r262910: Take a group name on the command-line [of groupdel] if available
  r262982: Whitespace [in group_input.subr]
  r262984: Remove vestigial global [in group_input.subr]
  r263133: Remove extraneous debug statement
  r263134: Add debug statement just before attempting to exec a module
  r263135: Comments [in device.subr]
  r263136: Update copyright
  r263137: Fix future namespace issues [in dialog.subr]
  r263139: Remove useless NULL strings ('') in some compound strings
  r263141: Fix broken f_isinteger() [of strings.subr]
  r263144: Fix a code-type that prevented auto-sizing [in group_input.subr]
  r263145: Fix comments and whitespace [in new group.subr]
  r263146: Reduce dialog sleep cycle for confirmation dialogs [in group.subr]
  r263147: Fix bug preventing pw(8) errors from appearing [in group.subr]
  r263148: Check arguments when running non-interactive [in group.subr]
  r263149: Add i18n input protection [to group.subr and group_input.subr]
  r263150: Rewrite usermgmt -- hooking it into the scripting system
  r263249: (partial) Add old group_input and user_input to ObsoleteFiles.inc

Added:
  stable/9/usr.sbin/bsdconfig/includes/
     - copied from r258400, head/usr.sbin/bsdconfig/includes/
  stable/9/usr.sbin/bsdconfig/share/keymap.subr
     - copied, changed from r256325, head/usr.sbin/bsdconfig/share/keymap.subr
  stable/9/usr.sbin/bsdconfig/usermgmt/share/group.subr
     - copied, changed from r262904, head/usr.sbin/bsdconfig/usermgmt/share/group.subr
  stable/9/usr.sbin/bsdconfig/usermgmt/share/user.subr
     - copied unchanged from r263150, head/usr.sbin/bsdconfig/usermgmt/share/user.subr
Deleted:
  stable/9/usr.sbin/bsdconfig/usermgmt/groupinput
  stable/9/usr.sbin/bsdconfig/usermgmt/userinput
Modified:
  stable/9/ObsoleteFiles.inc   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/Makefile
  stable/9/usr.sbin/bsdconfig/bsdconfig
  stable/9/usr.sbin/bsdconfig/console/console
  stable/9/usr.sbin/bsdconfig/console/font
  stable/9/usr.sbin/bsdconfig/console/include/messages.subr
  stable/9/usr.sbin/bsdconfig/console/keymap
  stable/9/usr.sbin/bsdconfig/console/repeat
  stable/9/usr.sbin/bsdconfig/console/saver
  stable/9/usr.sbin/bsdconfig/console/screenmap
  stable/9/usr.sbin/bsdconfig/console/ttys
  stable/9/usr.sbin/bsdconfig/diskmgmt/diskmgmt
  stable/9/usr.sbin/bsdconfig/docsinstall/docsinstall
  stable/9/usr.sbin/bsdconfig/dot/dot
  stable/9/usr.sbin/bsdconfig/include/messages.subr
  stable/9/usr.sbin/bsdconfig/includes/USAGE
  stable/9/usr.sbin/bsdconfig/includes/includes
  stable/9/usr.sbin/bsdconfig/mouse/disable
  stable/9/usr.sbin/bsdconfig/mouse/enable
  stable/9/usr.sbin/bsdconfig/mouse/flags
  stable/9/usr.sbin/bsdconfig/mouse/include/messages.subr
  stable/9/usr.sbin/bsdconfig/mouse/mouse
  stable/9/usr.sbin/bsdconfig/mouse/port
  stable/9/usr.sbin/bsdconfig/mouse/type
  stable/9/usr.sbin/bsdconfig/networking/defaultrouter
  stable/9/usr.sbin/bsdconfig/networking/devices
  stable/9/usr.sbin/bsdconfig/networking/hostname
  stable/9/usr.sbin/bsdconfig/networking/include/messages.subr
  stable/9/usr.sbin/bsdconfig/networking/nameservers
  stable/9/usr.sbin/bsdconfig/networking/networking
  stable/9/usr.sbin/bsdconfig/networking/share/device.subr
  stable/9/usr.sbin/bsdconfig/networking/share/hostname.subr
  stable/9/usr.sbin/bsdconfig/networking/share/ipaddr.subr
  stable/9/usr.sbin/bsdconfig/networking/share/media.subr
  stable/9/usr.sbin/bsdconfig/networking/share/netmask.subr
  stable/9/usr.sbin/bsdconfig/networking/share/resolv.subr
  stable/9/usr.sbin/bsdconfig/networking/share/routing.subr
  stable/9/usr.sbin/bsdconfig/networking/share/services.subr
  stable/9/usr.sbin/bsdconfig/packages/packages
  stable/9/usr.sbin/bsdconfig/password/password
  stable/9/usr.sbin/bsdconfig/password/share/password.subr
  stable/9/usr.sbin/bsdconfig/security/kern_securelevel
  stable/9/usr.sbin/bsdconfig/security/security
  stable/9/usr.sbin/bsdconfig/share/Makefile
  stable/9/usr.sbin/bsdconfig/share/common.subr
  stable/9/usr.sbin/bsdconfig/share/device.subr
  stable/9/usr.sbin/bsdconfig/share/dialog.subr
  stable/9/usr.sbin/bsdconfig/share/media/any.subr
  stable/9/usr.sbin/bsdconfig/share/media/cdrom.subr
  stable/9/usr.sbin/bsdconfig/share/media/common.subr
  stable/9/usr.sbin/bsdconfig/share/media/directory.subr
  stable/9/usr.sbin/bsdconfig/share/media/dos.subr
  stable/9/usr.sbin/bsdconfig/share/media/floppy.subr
  stable/9/usr.sbin/bsdconfig/share/media/ftp.subr
  stable/9/usr.sbin/bsdconfig/share/media/http.subr
  stable/9/usr.sbin/bsdconfig/share/media/httpproxy.subr
  stable/9/usr.sbin/bsdconfig/share/media/nfs.subr
  stable/9/usr.sbin/bsdconfig/share/media/options.subr
  stable/9/usr.sbin/bsdconfig/share/media/tcpip.subr
  stable/9/usr.sbin/bsdconfig/share/media/ufs.subr
  stable/9/usr.sbin/bsdconfig/share/media/usb.subr
  stable/9/usr.sbin/bsdconfig/share/mustberoot.subr
  stable/9/usr.sbin/bsdconfig/share/packages/categories.subr
  stable/9/usr.sbin/bsdconfig/share/packages/packages.subr
  stable/9/usr.sbin/bsdconfig/share/script.subr
  stable/9/usr.sbin/bsdconfig/share/strings.subr
  stable/9/usr.sbin/bsdconfig/share/sysrc.subr
  stable/9/usr.sbin/bsdconfig/share/variable.subr
  stable/9/usr.sbin/bsdconfig/startup/include/messages.subr
  stable/9/usr.sbin/bsdconfig/startup/misc
  stable/9/usr.sbin/bsdconfig/startup/rcadd
  stable/9/usr.sbin/bsdconfig/startup/rcconf
  stable/9/usr.sbin/bsdconfig/startup/rcdelete
  stable/9/usr.sbin/bsdconfig/startup/rcedit
  stable/9/usr.sbin/bsdconfig/startup/rcvar
  stable/9/usr.sbin/bsdconfig/startup/share/rcconf.subr
  stable/9/usr.sbin/bsdconfig/startup/share/rcedit.subr
  stable/9/usr.sbin/bsdconfig/startup/share/rcvar.subr
  stable/9/usr.sbin/bsdconfig/startup/startup
  stable/9/usr.sbin/bsdconfig/timezone/share/menus.subr
  stable/9/usr.sbin/bsdconfig/timezone/share/zones.subr
  stable/9/usr.sbin/bsdconfig/timezone/timezone
  stable/9/usr.sbin/bsdconfig/ttys/ttys
  stable/9/usr.sbin/bsdconfig/usermgmt/Makefile
  stable/9/usr.sbin/bsdconfig/usermgmt/groupadd
  stable/9/usr.sbin/bsdconfig/usermgmt/groupdel
  stable/9/usr.sbin/bsdconfig/usermgmt/groupedit
  stable/9/usr.sbin/bsdconfig/usermgmt/include/messages.subr
  stable/9/usr.sbin/bsdconfig/usermgmt/share/Makefile
  stable/9/usr.sbin/bsdconfig/usermgmt/share/group_input.subr
  stable/9/usr.sbin/bsdconfig/usermgmt/share/user_input.subr
  stable/9/usr.sbin/bsdconfig/usermgmt/useradd
  stable/9/usr.sbin/bsdconfig/usermgmt/userdel
  stable/9/usr.sbin/bsdconfig/usermgmt/useredit
  stable/9/usr.sbin/bsdconfig/usermgmt/usermgmt
Directory Properties:
  stable/9/   (props changed)
  stable/9/usr.sbin/   (props changed)
  stable/9/usr.sbin/bsdconfig/   (props changed)

Modified: stable/9/ObsoleteFiles.inc
==============================================================================
--- stable/9/ObsoleteFiles.inc	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/ObsoleteFiles.inc	Thu Mar 27 03:20:47 2014	(r263791)
@@ -84,6 +84,10 @@ OLD_FILES+=usr/lib32/libssh.a
 OLD_FILES+=usr/lib32/libssh.so
 OLD_LIBS+=usr/lib32/libssh.so.5
 OLD_FILES+=usr/lib32/libssh_p.a
+# 20140314: bsdconfig usermgmt rewrite
+OLD_FILES+=usr/libexec/bsdconfig/070.usermgmt/userinput
+# 20140307: bsdconfig groupmgmt rewrite
+OLD_FILES+=usr/libexec/bsdconfig/070.usermgmt/groupinput
 # 20131109: extattr(2) mlinks fixed
 OLD_FILES+=usr/share/man/man2/extattr_delete_list.2.gz
 OLD_FILES+=usr/share/man/man2/extattr_get_list.2.gz

Modified: stable/9/usr.sbin/bsdconfig/Makefile
==============================================================================
--- stable/9/usr.sbin/bsdconfig/Makefile	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/Makefile	Thu Mar 27 03:20:47 2014	(r263791)
@@ -6,6 +6,7 @@ SUBDIR=	console \
 	dot \
 	examples \
 	include \
+	includes \
 	mouse \
 	networking \
 	packages \

Modified: stable/9/usr.sbin/bsdconfig/bsdconfig
==============================================================================
--- stable/9/usr.sbin/bsdconfig/bsdconfig	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/bsdconfig	Thu Mar 27 03:20:47 2014	(r263791)
@@ -1,7 +1,7 @@
 #!/bin/sh
 #-
 # Copyright (c) 2012 Ron McDowell
-# Copyright (c) 2012-2013 Devin Teske
+# Copyright (c) 2012-2014 Devin Teske
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -300,7 +300,7 @@ dialog_menu_main()
 	f_dialog_menutag_store "$menu_choice"
 
 	# Only update default-item on success
-	[ $retval -eq 0 ] && f_dialog_default_store "$menu_choice"
+	[ $retval -eq $DIALOG_OK ] && f_dialog_default_store "$menu_choice"
 
 	return $retval
 }
@@ -315,8 +315,7 @@ if [ "$pgm" != "bsdconfig" ]; then
 	if indexfile=$( f_index_file "$pgm" ) &&
 	   cmd=$( f_index_menusel_command "$indexfile" "$pgm" )
 	then
-		f_dprintf "pgm=[%s] indexfile=[%s] cmd=[%s]" \
-		          "$pgm" "$indexfile" "$cmd"
+		f_dprintf "pgm=[%s] cmd=[%s] *=[%s]" "$pgm" "$cmd" "$*"
 		exec "$cmd" "$@" || exit 1
 	else
 		f_include $BSDCFG_SHARE/script.subr
@@ -324,7 +323,7 @@ if [ "$pgm" != "bsdconfig" ]; then
 			[ "$pgm" = "$resword" ] || continue
 			# Found a match
 			f_dprintf "pgm=[%s] A valid resWord!" "$pgm"
-			f_dispatch $resword
+			f_dispatch $resword $resword "$@"
 			exit $?
 		done
 	fi
@@ -342,7 +341,7 @@ while getopts f:h$GETOPTS_STDARGS flag; 
 	h|\?) usage ;;
 	esac
 done
-shift $(( $OPTIND -1 ))
+shift $(( $OPTIND - 1 ))
 
 # If we've loaded any scripts, do not continue any further
 [ $scripts_loaded -gt 0 ] && exit
@@ -382,6 +381,7 @@ if [ "$1" ]; then
 		# Not reached
 	fi
 
+	f_dprintf "cmd=[%s] *=[%s]" "$cmd" "$*"
 	shift
 	exec $cmd ${USE_XDIALOG:+-X} "$@" || exit 1
 	# Not reached
@@ -396,11 +396,10 @@ while :; do
 	f_dialog_menutag_fetch mtag
 	f_dprintf "retval=%u mtag=[%s]" $retval "$mtag"
 
-	if [ $retval -eq 2 ]; then
-		# The Help button was pressed
+	if [ $retval -eq $DIALOG_HELP ]; then
 		f_show_help "$BSDCONFIG_HELPFILE"
 		continue
-	elif [ $retval -ne 0 ]; then
+	elif [ $retval -ne $DIALOG_OK ]; then
 		f_die
 	fi
 

Modified: stable/9/usr.sbin/bsdconfig/console/console
==============================================================================
--- stable/9/usr.sbin/bsdconfig/console/console	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/console/console	Thu Mar 27 03:20:47 2014	(r263791)
@@ -37,8 +37,8 @@ f_include $BSDCFG_SHARE/mustberoot.subr
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ FUNCTIONS
 

Modified: stable/9/usr.sbin/bsdconfig/console/font
==============================================================================
--- stable/9/usr.sbin/bsdconfig/console/font	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/console/font	Thu Mar 27 03:20:47 2014	(r263791)
@@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ FUNCTIONS
 
@@ -174,14 +174,16 @@ esac
 
 [ "$f8" -a "$f14" -a "$f16" ] || f_die 1 "$msg_unknown_font_selection"
 
-f_sysrc_set font8x8 "$f8" || f_die
-f_sysrc_set font8x14 "$f14" || f_die
-f_sysrc_set font8x16 "$f16" || f_die
+f_eval_catch "$0" f_sysrc_set 'f_sysrc_set font8x8 "%s"' "$f8" || f_die
+f_eval_catch "$0" f_sysrc_set 'f_sysrc_set font8x14 "%s"' "$f14" || f_die
+f_eval_catch "$0" f_sysrc_set 'f_sysrc_set font8x16 "%s"' "$f16" || f_die
 
 if [ "$mc_start" ]; then
-	f_sysrc_set mousechar_start "$mc_start" || f_die
+	f_eval_catch "$0" f_sysrc_set \
+		'f_sysrc_set mousechar_start "%s"' "$mc_start" || f_die
 else
-	f_sysrc_delete mousechar_start || f_die
+	f_eval_catch "$0" f_sysrc_delete \
+		'f_sysrc_delete mousechar_start' || f_die
 fi
 
 exit $SUCCESS

Modified: stable/9/usr.sbin/bsdconfig/console/include/messages.subr
==============================================================================
--- stable/9/usr.sbin/bsdconfig/console/include/messages.subr	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/console/include/messages.subr	Thu Mar 27 03:20:47 2014	(r263791)
@@ -51,8 +51,8 @@ msg_cancel="Cancel"
 msg_central_european_iso="Central European ISO"
 msg_central_european_iso_desc="Central European ISO keymap"
 msg_choose_alternate_keyboard_map="Choose an alternate keyboard map"
-msg_choose_alternate_screenmap="Choose an alternate screenmap"
 msg_choose_alternate_screen_font="Choose an alternate screen font"
+msg_choose_alternate_screenmap="Choose an alternate screenmap"
 msg_choose_console_terminal_type="Choose console terminal type"
 msg_configure_screen_saver="Configure the screen saver"
 msg_console_menu_text="The system console driver for FreeBSD has a number of configuration\noptions which may be set according to your preference.\n\nWhen you are done setting configuration options, select Cancel."
@@ -74,9 +74,9 @@ msg_enter_timeout_period="Enter time-out
 msg_estonian_cp850="Estonian CP850"
 msg_estonian_cp850_desc="Estonian Code Page 850 keymap"
 msg_estonian_iso="Estonian ISO"
-msg_estonian_iso_desc="Estonian ISO keymap"
 msg_estonian_iso_15="Estonian ISO 15"
 msg_estonian_iso_15_desc="Estonian ISO 8859-15 keymap"
+msg_estonian_iso_desc="Estonian ISO keymap"
 msg_exit="Exit"
 msg_exit_this_menu="Exit this menu"
 msg_fade="Fade"
@@ -97,8 +97,6 @@ msg_french_iso_accent_desc="French ISO k
 msg_french_iso_desc="French ISO keymap"
 msg_french_iso_macbook="French ISO/Macbook"
 msg_french_iso_macbook_desc="French ISO keymap on macbook"
-msg_green="Green"
-msg_green_desc="\"Green\" power saving mode (if supported by monitor)"
 msg_german_cp850="German CP850"
 msg_german_cp850_desc="German Code Page 850 keymap"
 msg_german_iso="German ISO"
@@ -109,10 +107,14 @@ msg_greek_104="Greek 104"
 msg_greek_104_desc="Greek ISO keymap (104 keys)"
 msg_greek_elot="Greek ELOT"
 msg_greek_elot_desc="Greek ISO keymap (ELOT 1000)"
+msg_green="Green"
+msg_green_desc="\"Green\" power saving mode (if supported by monitor)"
 msg_hungarian_101="Hungarian 101"
 msg_hungarian_101_desc="Hungarian ISO keymap (101 key)"
 msg_hungarian_102="Hungarian 102"
 msg_hungarian_102_desc="Hungarian ISO keymap (102 key)"
+msg_ibm_1251="IBM 1251"
+msg_ibm_1251_desc="Cyrillic, MS Windows encoding"
 msg_ibm_437="IBM 437"
 msg_ibm_437_desc="English and others, VGA default"
 msg_ibm_437_vga_default="IBM437 (VGA default)"
@@ -124,12 +126,12 @@ msg_ibm_866="IBM 866"
 msg_ibm_866_desc="Russian, IBM encoding (use with KOI8-R screenmap)"
 msg_ibm_866u="IBM 866u"
 msg_ibm_866u_desc="Ukrainian, IBM encoding (use with KOI8-U screenmap)"
-msg_ibm_1251="IBM 1251"
-msg_ibm_1251_desc="Cyrillic, MS Windows encoding"
 msg_icelandic="Icelandic"
 msg_icelandic_accent="Icelandic (accent)"
 msg_icelandic_accent_desc="Icelandic ISO keymap (accent keys)"
 msg_icelandic_desc="Icelandic ISO keymap"
+msg_iso_8859_15="ISO 8859-15"
+msg_iso_8859_15_desc="Europe, ISO encoding"
 msg_iso_8859_1="ISO 8859-1"
 msg_iso_8859_1_desc="Western Europe, ISO encoding"
 msg_iso_8859_1_to_ibm437="ISO 8859-1 to IBM437"
@@ -144,8 +146,6 @@ msg_iso_8859_7_to_ibm437="ISO 8859-7 to 
 msg_iso_8859_7_to_ibm437_desc="Greek ISO 8859-1 to IBM 437 screenmap"
 msg_iso_8859_8="ISO 8859-8"
 msg_iso_8859_8_desc="Hebrew, ISO encoding"
-msg_iso_8859_15="ISO 8859-15"
-msg_iso_8859_15_desc="Europe, ISO encoding"
 msg_italian="Italian"
 msg_italian_desc="Italian ISO keymap"
 msg_japanese_106="Japanese 106"
@@ -153,9 +153,9 @@ msg_japanese_106_desc="Japanese 106 keym
 msg_keymap="Keymap"
 msg_keymap_menu_text="The system console driver for FreeBSD defaults to a standard\n\"US\" keyboard map.  Users may wish to choose one of the\nother keymaps below."
 msg_koi8_r="KOI8-R"
-msg_koi8_u="KOI8-U"
 msg_koi8_r_to_ibm866="KOI8-R to IBM866"
 msg_koi8_r_to_ibm866_desc="Russian KOI8-R to IBM 866 screenmap"
+msg_koi8_u="KOI8-U"
 msg_koi8_u_to_ibm866u="KOI8-U to IBM866u"
 msg_koi8_u_to_ibm866u_desc="Ukrainian KOI8-U to IBM 866u screenmap"
 msg_latin_american="Latin American"
@@ -224,8 +224,8 @@ msg_swiss_german_iso_accent_desc="Swiss 
 msg_swiss_german_iso_desc="Swiss German ISO keymap"
 msg_system_console_configuration="System Console Configuration"
 msg_system_console_font="System Console Font"
-msg_system_console_keymap="System Console Keymap"
 msg_system_console_keyboard_repeat_rate="System Console Keyboard Repeat Rate"
+msg_system_console_keymap="System Console Keymap"
 msg_system_console_screen_saver="System Console Screen Saver"
 msg_system_console_screenmap="System Console Screenmap"
 msg_system_console_terminal_type="System Console Terminal Type"

Modified: stable/9/usr.sbin/bsdconfig/console/keymap
==============================================================================
--- stable/9/usr.sbin/bsdconfig/console/keymap	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/console/keymap	Thu Mar 27 03:20:47 2014	(r263791)
@@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ CONFIGURATION
 
@@ -246,10 +246,8 @@ while :; do
 	keymap_name=
 	mtag="${mtag# }" # remove single leading-space if-present
 	for name in $KEYMAP_NAMES; do
-		if [ "$( eval echo \"\$msg_$name\" )" = "$mtag" ]; then
-			keymap_name="$name"
-			break
-		fi
+		debug= f_getvar msg_$name msg
+		[ "$msg" = "$mtag" ] && keymap_name="$name" break
 	done
 
 	[ "$keymap_name" ] || continue
@@ -319,7 +317,8 @@ while :; do
 	esac
 
 	if [ "$keymap_to_set" ]; then
-		f_sysrc_set keymap "$keymap_to_set" || f_die
+		f_eval_catch "$0" f_sysrc_set \
+			'f_sysrc_set keymap "%s"' "$keymap_to_set" || f_die
 		break
 	else
 		f_die 1 "$msg_unknown_keymap"

Modified: stable/9/usr.sbin/bsdconfig/console/repeat
==============================================================================
--- stable/9/usr.sbin/bsdconfig/console/repeat	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/console/repeat	Thu Mar 27 03:20:47 2014	(r263791)
@@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ FUNCTIONS
 
@@ -129,7 +129,8 @@ case "$mtag" in
 esac
 
 if [ "$repeat_rate_to_set" ]; then
-	f_sysrc_set keyrate "$repeat_rate_to_set" || f_die
+	f_eval_catch "$0" f_sysrc_set \
+		'f_sysrc_set keyrate "%s"' "$repeat_rate_to_set" || f_die
 	break
 else
 	f_die 1 "$msg_unknown_repeat_rate"

Modified: stable/9/usr.sbin/bsdconfig/console/saver
==============================================================================
--- stable/9/usr.sbin/bsdconfig/console/saver	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/console/saver	Thu Mar 27 03:20:47 2014	(r263791)
@@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ FUNCTIONS
 
@@ -144,7 +144,8 @@ case "$mtag" in
 	f_dialog_title "$msg_value_required"
 	f_dialog_input blanktime "$msg_enter_timeout_period" \
 	               "$( f_sysrc_get blanktime )" &&
-		f_sysrc_set blanktime "$blanktime" || f_die
+		f_eval_catch "$0" f_sysrc_set \
+			'f_sysrc_set blanktime "%s"' "$blanktime" || f_die
 	f_dialog_title_restore
 	exit $SUCCESS
 esac
@@ -180,7 +181,8 @@ case "$mtag" in
 esac
 
 if [ "$saver_to_set" ]; then
-	f_sysrc_set saver "$saver_to_set" || f_die
+	f_eval_catch "$0" f_sysrc_set \
+		'f_sysrc_set saver "%s"' "$saver_to_set" || f_die
 	break
 else
 	f_die 1 "$msg_unknown_saver"

Modified: stable/9/usr.sbin/bsdconfig/console/screenmap
==============================================================================
--- stable/9/usr.sbin/bsdconfig/console/screenmap	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/console/screenmap	Thu Mar 27 03:20:47 2014	(r263791)
@@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ FUNCTIONS
 
@@ -141,7 +141,8 @@ case "$mtag" in
 esac
 
 if [ "$scrnmap_to_set" ]; then
-	f_sysrc_set scrnmap "$scrnmap_to_set" || f_die
+	f_eval_catch "$0" f_sysrc_set \
+		'f_sysrc_set scrnmap "%s"' "$scrnmap_to_set" || f_die
 	break
 else
 	f_die 1 "$msg_unknown_screenmap_selection"

Modified: stable/9/usr.sbin/bsdconfig/console/ttys
==============================================================================
--- stable/9/usr.sbin/bsdconfig/console/ttys	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/console/ttys	Thu Mar 27 03:20:47 2014	(r263791)
@@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ CONFIGURATION
 
@@ -92,7 +92,7 @@ dialog_menu_main()
 	local retval=$?
 	f_dialog_menutag_store -s "$menu_choice"
 
-	if [ $retval -eq $SUCCESS ]; then
+	if [ $retval -eq $DIALOG_OK ]; then
 		local item
 		item=$( eval f_dialog_menutag2item \
 		        	\"\$menu_choice\" $menu_list )
@@ -108,23 +108,28 @@ dialog_menu_main()
 #
 ttys_set_type()
 {
+	local funcname=ttys_set_type
 	local consterm="$1" err
 
 	#
 	# Create new temporary file to write our ttys(5) update with new types.
 	#
-	local tmpfile="$( mktemp -t "pgm" )"
-	[ "$tmpfile" ] || return $FAILURE
+	local tmpfile
+	f_eval_catch -k tmpfile $funcname mktemp 'mktemp -t "%s"' "$pgm" ||
+		return $FAILURE
 
 	#
 	# Fixup permissions and ownership (mktemp(1) creates the temporary file
 	# with 0600 permissions -- change the permissions and ownership to
 	# match ttys(5) before we write it out and mv(1) it into place).
 	#
-	local mode="$( stat -f '%#Lp' "$ETC_TTYS" 2> /dev/null )"
-	local owner="$( stat -f '%u:%g' "$ETC_TTYS" 2> /dev/null )"
-	f_quietly chmod "${mode:-0644}" "$tmpfile"
-	f_quietly chown "${owner:-root:wheel}" "$tmpfile"
+	local mode owner
+	f_eval_catch -dk mode $funcname stat \
+		'stat -f "%%#Lp" "%s"' "$ETC_TTYS" || mode=0644
+	f_eval_catch -dk owner $funcname stat \
+		'stat -f "%%u:%%g" "%s"' "$ETC_TTYS" || owner="root:wheel"
+	f_eval_catch -d $funcname chmod 'chmod "%s" "%s"' "$mode" "$tmpfile"
+	f_eval_catch -d $funcname chown 'chown "%s" "%s"' "$owner" "$tmpfile"
 
 	#
 	# Operate on ttys(5), replacing only the types of `ttyv*' and
@@ -156,10 +161,8 @@ ttys_set_type()
 		f_dialog_msgbox "$err"
 		return $FAILURE
 	fi
-	if ! err=$( mv -f "$tmpfile" "$ETC_TTYS" 2>&1 ); then
-		f_dialog_msgbox "$err"
+	f_eval_catch $funcname mv 'mv -f "%s" "%s"' "$tmpfile" "$ETC_TTYS" ||
 		return $FAILURE
-	fi
 
 	return $SUCCESS
 }

Modified: stable/9/usr.sbin/bsdconfig/diskmgmt/diskmgmt
==============================================================================
--- stable/9/usr.sbin/bsdconfig/diskmgmt/diskmgmt	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/diskmgmt/diskmgmt	Thu Mar 27 03:20:47 2014	(r263791)
@@ -37,8 +37,8 @@ f_include $BSDCFG_SHARE/mustberoot.subr
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="050.diskmgmt"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ CONFIGURATION
 

Modified: stable/9/usr.sbin/bsdconfig/docsinstall/docsinstall
==============================================================================
--- stable/9/usr.sbin/bsdconfig/docsinstall/docsinstall	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/docsinstall/docsinstall	Thu Mar 27 03:20:47 2014	(r263791)
@@ -37,8 +37,8 @@ f_include $BSDCFG_SHARE/mustberoot.subr
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="020.docsinstall"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ CONFIGURATION
 

Modified: stable/9/usr.sbin/bsdconfig/dot/dot
==============================================================================
--- stable/9/usr.sbin/bsdconfig/dot/dot	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/dot/dot	Thu Mar 27 03:20:47 2014	(r263791)
@@ -41,8 +41,8 @@ BSDCFG_LIBE="/usr/libexec/bsdconfig" APP
 f_include_lang $BSDCFG_LIBE/include/messages.subr
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ CONFIGURATION
 
@@ -163,7 +163,7 @@ while getopts cdhi flag; do
 done
 shift $(( $OPTIND - 1 ))
 
-cd $BSDCFG_LIBE || f_die 1 "$msg_directory_not_found" "$BSDCFG_LIB"
+cd $BSDCFG_LIBE || f_die # Pedantic
 
 #
 # Get a list of menu programs

Modified: stable/9/usr.sbin/bsdconfig/include/messages.subr
==============================================================================
--- stable/9/usr.sbin/bsdconfig/include/messages.subr	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/include/messages.subr	Thu Mar 27 03:20:47 2014	(r263791)
@@ -40,6 +40,7 @@ msg_afterstep_desc="Ports to support the
 msg_all="All"
 msg_all_desc="All available packages in all categories."
 msg_always_try_sudo_when_run_as="Always try sudo(8) when run as %s"
+msg_an_unknown_error_occurred="An unknown error occurred"
 msg_arabic_desc="Ported software for Arab countries."
 msg_archivers_desc="Utilities for archiving and unarchiving data."
 msg_armenia="Armenia"
@@ -166,8 +167,8 @@ msg_install_from_an_http_server="Install
 msg_install_from_the_existing_filesystem="Install from the existing filesystem"
 msg_install_over_nfs="Install over NFS"
 msg_installed="Installed"
-msg_installed_lc="installed"
 msg_installed_desc="Leave package as-is, installed"
+msg_installed_lc="installed"
 msg_invalid_gateway_ipv4_address_specified="Invalid gateway IPv4 address specified"
 msg_invalid_hostname_value="Invalid hostname value"
 msg_invalid_ipv4_address="Invalid IPv4 address"
@@ -201,6 +202,7 @@ msg_lithuania="Lithuania"
 msg_loading_of_dependent_package_failed="Loading of dependent package %s failed"
 msg_located_index_now_reading_package_data_from_it="Located INDEX, now reading package data from it..."
 msg_logging_in_to_user_at_host="Logging in to %s@%s.."
+msg_looking_for_keymap_files="Looking for keymap files..."
 msg_looking_up_host="Looking up host %s"
 msg_mail_desc="Electronic mail packages and utilities."
 msg_main_menu="Main Menu"

Modified: stable/9/usr.sbin/bsdconfig/includes/USAGE
==============================================================================
--- head/usr.sbin/bsdconfig/includes/USAGE	Wed Nov 20 20:37:21 2013	(r258400)
+++ stable/9/usr.sbin/bsdconfig/includes/USAGE	Thu Mar 27 03:20:47 2014	(r263791)
@@ -28,6 +28,7 @@ Usage: bsdconfig @PROGRAM_NAME@ [OPTIONS
 
 OPTIONS:
 	-a    Always use color even when output is not to a terminal.
+	-d    Print description for each function selected. Implies `-f'.
 	-f    Show functions for selected includes.
 	-F pattern
 	      If `-f', only print functions matching pattern. Without `-f'
@@ -64,3 +65,7 @@ EXAMPLES:
 		bsdconfig @PROGRAM_NAME@ -F show common
 
 	NB: The `.subr' suffix on the end of the include is optional.
+
+	Show descriptions of each of the `show' functions:
+
+		bsdconfig @PROGRAM_NAME@ -dF show

Modified: stable/9/usr.sbin/bsdconfig/includes/includes
==============================================================================
--- head/usr.sbin/bsdconfig/includes/includes	Wed Nov 20 20:37:21 2013	(r258400)
+++ stable/9/usr.sbin/bsdconfig/includes/includes	Thu Mar 27 03:20:47 2014	(r263791)
@@ -29,7 +29,7 @@
 ############################################################ INCLUDES
 
 # Prevent common.subr from auto initializing debugging (this is not an inter-
-# active utility that requires debugging).
+# active utility that requires debugging; also `-d' has been repurposed).
 #
 DEBUG_SELF_INITIALIZE=NO
 
@@ -41,8 +41,8 @@ BSDCFG_LIBE="/usr/libexec/bsdconfig" APP
 f_include_lang $BSDCFG_LIBE/include/messages.subr
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ GLOBALS
 
@@ -50,6 +50,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_
 # Options
 #
 USE_COLOR=1
+SHOW_DESC=
 SHOW_FUNCS=
 FUNC_PATTERN=
 
@@ -64,24 +65,62 @@ show_include()
 	local file="${1#./}"
 
 	local pattern="${FUNC_PATTERN:-.*}"
-	output=$( awk -v use_color=${USE_COLOR:-0} -v re="$pattern" '
+	output=$( awk \
+		-v use_color=${USE_COLOR:-0} \
+		-v re="$pattern" \
+		-v show_desc=${SHOW_DESC:-0} '
+        function asorti(src, dest)
+        {
+		# Copy src indices to dest and calculate array length
+		nitems = 0; for (i in src) dest[++nitems] = i
+
+		# Sort the array of indices (dest) using insertion sort method
+		for (i = 1; i <= nitems; k = i++)
+		{
+			idx = dest[i]
+			while ((k > 0) && (dest[k] > idx))
+			{
+				dest[k+1] = dest[k]
+				k--
+			}
+			dest[k+1] = idx
+		}
+
+		return nitems
+        }
 	/^$/,/^#/ {
 		if ($0 ~ /^# f_/) {
 			if (!match($2, re)) next
+			fn = $2
 			if (use_color)
-				printf " %s%s%s\n",
+				syntax[fn] = sprintf("+%s%s%s\n",
 				       substr($0, 2, RSTART),
 				       substr($0, 2 + RSTART, RLENGTH),
-				       substr($0, 2 + RSTART + RLENGTH)
+				       substr($0, 2 + RSTART + RLENGTH))
 			else
-				print substr($0, 2)
-			print_more = substr($0, length($0)) == "\\"
+				syntax[fn] = "+" substr($0, 2) "\n"
+			if (show_desc)
+				print_more = 1
+			else
+				print_more = substr($0, length($0)) == "\\"
 		}
-		while (print_more) {
+		if (show_desc && print_more) {
+			getline
+			while ($0 ~ /^#/) {
+				syntax[fn] = syntax[fn] " " substr($0, 2) "\n"
+				getline
+			}
+			print_more = 0
+		} else while (print_more) {
 			getline
-			print substr($0, 2)
+			syntax[fn] = syntax[fn] " " substr($0, 2) "\n"
 			print_more = substr($0, length($0)) == "\\"
 		}
+	}
+	END {
+		n = asorti(syntax, sorted_indices)
+		for (i = 1; i <= n; i++)
+			printf "%s", syntax[sorted_indices[i]]
 	}' "$file" )
 	if [ "$output" ]; then
 		if [ ! "$SHOW_FUNCS" ]; then
@@ -89,10 +128,10 @@ show_include()
 			return $SUCCESS
 		fi
 		if [ "$FUNC_PATTERN" ]; then
-			printf "$msg_functions_in_matching\n" \
+			printf ">>> $msg_functions_in_matching\n" \
 			       "$file" "$FUNC_PATTERN"
 		else
-			printf "$msg_functions_in\n" "$file"
+			printf ">>> $msg_functions_in\n" "$file"
 		fi
 		echo "$output"
 		echo # blank line to simplify awk(1)-based reparse
@@ -110,9 +149,10 @@ show_include()
 #
 # Process command-line arguments
 #
-while getopts afF:hn flag; do
+while getopts adfF:hn flag; do
 	case "$flag" in
 	a) USE_COLOR=1 ;;
+	d) SHOW_DESC=1 SHOW_FUNCS=1 ;;
 	f) SHOW_FUNCS=1 ;;
 	F) FUNC_PATTERN="$OPTARG" ;;
 	n) USE_COLOR= ;;
@@ -122,7 +162,7 @@ done
 shift $(( $OPTIND - 1 ))
 
 # cd(1) to `share' dir so relative paths work for find and positional args
-cd $BSDCFG_SHARE || f_die 1 "$msg_directory_not_found" "$BSDCFG_SHARE"
+cd $BSDCFG_SHARE || f_die # Pedantic
 
 #
 # If given an argument, operate on it specifically (implied `-f') and exit
@@ -132,9 +172,11 @@ for include in "$@"; do
 	# See if they've just omitted the `*.subr' suffix
 	[ -f "$include.subr" -a ! -f "$include" ] && include="$include.subr"
 	if [ ! -f "$include" ]; then
-		f_die 1 "$msg_no_such_file_or_directory" "$0" "$include"
+		printf "$msg_no_such_file_or_directory\n" "$0" "$include"
+		exit $FAILURE
 	elif [ ! -r "$include" ]; then
-		f_die 1 "$msg_permission_denied" "$0" "$include"
+		printf "$msg_permission_denied\n" "$0" "$include"
+		exit $FAILURE
 	fi
 	show_include "$include" || f_die
 done

Modified: stable/9/usr.sbin/bsdconfig/mouse/disable
==============================================================================
--- stable/9/usr.sbin/bsdconfig/mouse/disable	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/mouse/disable	Thu Mar 27 03:20:47 2014	(r263791)
@@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ CONFIGURATION
 
@@ -73,12 +73,16 @@ f_mustberoot_init
 #
 # Stop the mouse daemon
 #
-[ -r "$MOUSED_PIDFILE" ] &&
-	f_quietly kill "$( cat "$MOUSED_PIDFILE" )"
-f_sysrc_set moused_enable "NO" || f_die
-f_sysrc_set moused_type "NO" || f_die
-f_sysrc_delete moused_port || f_die
-f_sysrc_delete moused_flags || f_die
+if [ -r "$MOUSED_PIDFILE" ]; then
+	f_eval_catch -dk pid "$0" cat 'cat "%s"' "$MOUSED_PIDFILE" &&
+		f_isinteger "$pid" &&
+		[ $pid -gt 0 ] &&
+		f_eval_catch -d "$0" kill 'kill %s' $pid
+fi
+f_eval_catch "$0" f_sysrc_set 'f_sysrc_set moused_enable NO' || f_die
+f_eval_catch "$0" f_sysrc_set 'f_sysrc_set moused_type NO' || f_die
+f_eval_catch "$0" f_sysrc_delete 'f_sysrc_delete moused_port' || f_die
+f_eval_catch "$0" f_sysrc_delete 'f_sysrc_delete moused_flags' || f_die
 
 #
 # Message box

Modified: stable/9/usr.sbin/bsdconfig/mouse/enable
==============================================================================
--- stable/9/usr.sbin/bsdconfig/mouse/enable	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/mouse/enable	Thu Mar 27 03:20:47 2014	(r263791)
@@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ CONFIGURATION
 
@@ -85,10 +85,15 @@ flags=$( f_sysrc_get moused_flags )
 # Start the mouse daemon
 #
 f_dialog_info "$msg_trying_to_start_the_mouse_daemon"
-[ -r "$MOUSED_PIDFILE" ] &&
-	f_quietly kill "$( cat "$MOUSED_PIDFILE" 2> /dev/null )"
-f_quietly vidcontrol -m on
-f_quietly moused -t "$type" -p "$port" $flags
+if [ -r "$MOUSED_PIDFILE" ]; then
+	f_eval_catch -dk pid "$0" cat 'cat "%s"' "$MOUSED_PIDFILE" &&
+		f_isinteger "$pid" &&
+		[ $pid -gt 0 ] &&
+		f_eval_catch -d "$0" kill 'kill %s' $pid
+fi
+f_eval_catch -d "$0" vidcontrol 'vidcontrol -m on'
+f_eval_catch -d "$0" moused \
+	'moused -t "%s" -p "%s" %s' "$type" "$port" "$flags"
 
 #
 # Confirm with the user that the mouse is working
@@ -101,14 +106,19 @@ f_dialog_title_restore
 #
 # Stop the mouse daemon
 #
-f_quietly vidcontrol -m off
-if [ $retval -eq $SUCCESS ]; then
-	f_sysrc_set moused_enable "YES" || f_die
-	ln -fs /dev/sysmouse /dev/mouse || f_die # backwards compat
+f_eval_catch -d "$0" vidcontrol 'vidcontrol -m off'
+if [ $retval -eq $DIALOG_OK ]; then
+	f_eval_catch "$0" f_sysrc_set 'f_sysrc_set moused_enable YES' || f_die
+	f_eval_catch "$0" ln \
+		'ln -fs /dev/sysmouse /dev/mouse' || f_die # backwards compat
 else
-	[ -r "$MOUSED_PIDFILE" ] &&
-		f_quietly kill "$( cat "$MOUSED_PIDFILE" )"
-	f_sysrc_set moused_enable "NO" || f_die
+	if [ -r "$MOUSED_PIDFILE" ]; then
+		f_eval_catch -dk pid "$0" cat 'cat "%s"' "$MOUSED_PIDFILE" &&
+			f_isinteger "$pid" &&
+			[ $pid -gt 0 ] &&
+			f_eval_catch -d "$0" kill 'kill %s' $pid
+	fi
+	f_eval_catch "$0" f_sysrc_set 'f_sysrc_set moused_enable NO' || f_die
 fi
 
 exit $SUCCESS

Modified: stable/9/usr.sbin/bsdconfig/mouse/flags
==============================================================================
--- stable/9/usr.sbin/bsdconfig/mouse/flags	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/mouse/flags	Thu Mar 27 03:20:47 2014	(r263791)
@@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ CONFIGURATION
 
@@ -86,7 +86,7 @@ f_dialog_title_restore
 #
 # Save the new value
 #
-f_sysrc_set moused_flags "$flags" || f_die
+f_eval_catch "$0" f_sysrc_set 'f_sysrc_set moused_flags "%s"' "$flags" || f_die
 
 exit $SUCCESS
 

Modified: stable/9/usr.sbin/bsdconfig/mouse/include/messages.subr
==============================================================================
--- stable/9/usr.sbin/bsdconfig/mouse/include/messages.subr	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/mouse/include/messages.subr	Thu Mar 27 03:20:47 2014	(r263791)
@@ -58,14 +58,14 @@ msg_microsoft="Microsoft"
 msg_microsoft_desc="Microsoft protocol (serial)"
 msg_mm_series="MM Series"
 msg_mm_series_desc="MM Series protocol (serial)"
-msg_mouseman="MouseMan"
-msg_mouseman_desc="Logitech MouseMan/TrackMan models (serial)"
-msg_mousesystems="MouseSystems"
-msg_mousesystems_desc="MouseSystems protocol (serial)"
 msg_mouse_daemon_is_disabled="The mouse daemon is disabled."
 msg_mouse_disable="Mouse Disable"
 msg_mouse_enable="Mouse Enable"
 msg_mouse_flags="Mouse Flags"
+msg_mouseman="MouseMan"
+msg_mouseman_desc="Logitech MouseMan/TrackMan models (serial)"
+msg_mousesystems="MouseSystems"
+msg_mousesystems_desc="MouseSystems protocol (serial)"
 msg_now_move_the_mouse="Now move the mouse and see if it works.\n(Note that buttons don't have any effect for now.)\n\n         Is the mouse cursor moving?\n"
 msg_ok="OK"
 msg_please_configure_your_mouse="Please configure your mouse"

Modified: stable/9/usr.sbin/bsdconfig/mouse/mouse
==============================================================================
--- stable/9/usr.sbin/bsdconfig/mouse/mouse	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/mouse/mouse	Thu Mar 27 03:20:47 2014	(r263791)
@@ -37,8 +37,8 @@ f_include $BSDCFG_SHARE/mustberoot.subr
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ FUNCTIONS
 

Modified: stable/9/usr.sbin/bsdconfig/mouse/port
==============================================================================
--- stable/9/usr.sbin/bsdconfig/mouse/port	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/mouse/port	Thu Mar 27 03:20:47 2014	(r263791)
@@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ FUNCTIONS
 
@@ -141,7 +141,8 @@ case "$mtag" in
 esac
 
 if [ "$moused_port_to_set" ]; then
-	f_sysrc_set moused_port "$moused_port_to_set" || f_die
+	f_eval_catch "$0" f_sysrc_set \
+		'f_sysrc_set moused_port "%s"' "$moused_port_to_set" || f_die
 else
 	f_die 1 "$msg_unknown_mouse_port_selection"
 fi

Modified: stable/9/usr.sbin/bsdconfig/mouse/type
==============================================================================
--- stable/9/usr.sbin/bsdconfig/mouse/type	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/mouse/type	Thu Mar 27 03:20:47 2014	(r263791)
@@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ FUNCTIONS
 
@@ -157,7 +157,8 @@ case "$mtag" in
 esac
 
 if [ "$moused_type_to_set" ]; then
-	f_sysrc_set moused_type "$moused_type_to_set" || f_die
+	f_eval_catch "$0" f_sysrc_set \
+		'f_sysrc_set moused_type "%s"' "$moused_type_to_set" || f_die
 else
 	f_die 1 "$msg_unknown_mouse_protocol_selection"
 fi

Modified: stable/9/usr.sbin/bsdconfig/networking/defaultrouter
==============================================================================
--- stable/9/usr.sbin/bsdconfig/networking/defaultrouter	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/networking/defaultrouter	Thu Mar 27 03:20:47 2014	(r263791)
@@ -28,6 +28,9 @@
 #
 ############################################################ INCLUDES
 
+# Prevent device.subr (included indirectly) from auto scanning on load
+DEVICE_SELF_SCAN_ALL=NO
+
 BSDCFG_SHARE="/usr/share/bsdconfig"
 . $BSDCFG_SHARE/common.subr || exit 1
 f_dprintf "%s: loading includes..." "$0"
@@ -38,8 +41,8 @@ f_include $BSDCFG_SHARE/networking/routi
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ MAIN
 

Modified: stable/9/usr.sbin/bsdconfig/networking/devices
==============================================================================
--- stable/9/usr.sbin/bsdconfig/networking/devices	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/networking/devices	Thu Mar 27 03:20:47 2014	(r263791)
@@ -28,6 +28,12 @@
 #
 ############################################################ INCLUDES
 
+# Prevent device.subr (included indirectly) from auto scanning; this will be
+# performed indirectly later via f_dialog_menu_netdev() -- but only after we've
+# successfully completed f_mustberoot_init().
+#
+DEVICE_SELF_SCAN_ALL=NO
+
 BSDCFG_SHARE="/usr/share/bsdconfig"
 . $BSDCFG_SHARE/common.subr || exit 1
 f_dprintf "%s: loading includes..." "$0"
@@ -43,8 +49,8 @@ f_include $BSDCFG_SHARE/networking/netma
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ MAIN
 
@@ -137,8 +143,8 @@ while :; do
 	# Fill in IP address/netmask from active settings if no
 	# configuration could be extrapolated from rc.conf(5)
 	#
-	[ "$_ipaddr"  ] || _ipaddr=$( f_ifconfig_inet $interface )
-	[ "$_netmask" ] || _netmask=$( f_ifconfig_netmask $interface )
+	[ "$_ipaddr"  ] || f_ifconfig_inet $interface _ipaddr
+	[ "$_netmask" ] || f_ifconfig_netmask $interface _netmask
 
 	# Get the extra options (this always comes from rc.conf(5))
 	_options=$( f_ifconfig_options $interface )
@@ -148,7 +154,7 @@ while :; do
 		"$interface" "$_ipaddr" "$_netmask" "$_options" $dhcp
 
 	# Return to root menu if above returns success
-	[ $? -eq $SUCCESS ] && break
+	[ $? -eq $DIALOG_OK ] && break
 done
 
 exit $SUCCESS

Modified: stable/9/usr.sbin/bsdconfig/networking/hostname
==============================================================================
--- stable/9/usr.sbin/bsdconfig/networking/hostname	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/networking/hostname	Thu Mar 27 03:20:47 2014	(r263791)
@@ -41,8 +41,8 @@ f_include $BSDCFG_SHARE/networking/hostn
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ MAIN
 

Modified: stable/9/usr.sbin/bsdconfig/networking/include/messages.subr
==============================================================================
--- stable/9/usr.sbin/bsdconfig/networking/include/messages.subr	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/networking/include/messages.subr	Thu Mar 27 03:20:47 2014	(r263791)
@@ -59,15 +59,15 @@ msg_ipv4_addr_octet_contains_invalid_cha
 msg_ipv4_addr_octet_exceeds_max_value="ERROR! One or more individual octets within the IPv4 address\n(separated by dots) exceeds the maximum of 255.\n\nInvalid IP Address: %s"
 msg_ipv4_addr_octet_is_null="ERROR! One or more individual octets within the IPv4 address\n(separated by dots) are null and/or missing.\n\nInvalid IP Address: %s"
 msg_ipv4_addr_octet_missing_or_extra="ERROR! The IPv4 address entered has either too few (less than\nfour) or too many (more than four) octets, separated by dots.\n\nInvalid IP Address: %s"
-msg_ipv6_addr_segment_contains_invalid_chars="ERROR! One or more individual segments within the IP address\n(separated by colons) contains one or more invalid characters.\nSegments must contain only combinations of the characters 0-9,\nA-F, or a-f.\n\nInvalid IPv6 Address: %s"
-msg_ipv6_addr_segment_contains_too_many_chars="ERROR! One or more individual segments within the IP address\n(separated by colons) exceeds the length of 4 hex-digits.\n\nInvalid IPv6 Address: %s"
-msg_ipv6_addr_too_few_or_extra_segments="ERROR! The IP address entered has either too few (less than 3), too\nmany (more than 8), or not enough segments, separated by colons.\n\nInvalid IPv6 Address: %s"
-msg_ipv6_addr_too_many_null_segments="ERROR! Too many/incorrect null segments. A single null\nsegment is allowed within the IP address (separated by\ncolons) but not allowed at the beginning or end (unless\na double-null segment; i.e., \"::*\" or \"*::\").\n\nInvalid IPv6 Address: %s"
 msg_ipv4_mask_field_contains_invalid_chars="ERROR! One or more individual fields within the subnet mask\n(separated by dots) contains one or more invalid characters.\n\nInvalid Subnet Mask: %s"
 msg_ipv4_mask_field_exceeds_max_value="ERROR! One or more individual fields within the subnet mask\n(separated by dots) exceeds the maximum of 255.\n\nInvalid Subnet Mask: %s"
 msg_ipv4_mask_field_invalid_value="ERROR! One or more individual fields within the subnet mask\n(separated by dots) contains one or more invalid integers.\nFields must be one of 0/128/192/224/240/248/252/254/255.\n\nInvalid Subnet Mask: %s"
 msg_ipv4_mask_field_is_null="ERROR! One or more individual fields within the subnet mask\n(separated by dots) are null and/or missing.\n\nInvalid Subnet Mask: %s"
 msg_ipv4_mask_field_missing_or_extra="ERROR! The subnet mask entered has either too few or too many\nfields.\n\nInvalid Subnet Mask: %s"
+msg_ipv6_addr_segment_contains_invalid_chars="ERROR! One or more individual segments within the IP address\n(separated by colons) contains one or more invalid characters.\nSegments must contain only combinations of the characters 0-9,\nA-F, or a-f.\n\nInvalid IPv6 Address: %s"
+msg_ipv6_addr_segment_contains_too_many_chars="ERROR! One or more individual segments within the IP address\n(separated by colons) exceeds the length of 4 hex-digits.\n\nInvalid IPv6 Address: %s"
+msg_ipv6_addr_too_few_or_extra_segments="ERROR! The IP address entered has either too few (less than 3), too\nmany (more than 8), or not enough segments, separated by colons.\n\nInvalid IPv6 Address: %s"
+msg_ipv6_addr_too_many_null_segments="ERROR! Too many/incorrect null segments. A single null\nsegment is allowed within the IP address (separated by\ncolons) but not allowed at the beginning or end (unless\na double-null segment; i.e., \"::*\" or \"*::\").\n\nInvalid IPv6 Address: %s"
 msg_netmask="netmask"
 msg_network_configuration="%s Network Configuration:\nChoose Save/Exit when finished or Cancel."
 msg_network_interfaces="Network Interfaces"

Modified: stable/9/usr.sbin/bsdconfig/networking/nameservers
==============================================================================
--- stable/9/usr.sbin/bsdconfig/networking/nameservers	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/networking/nameservers	Thu Mar 27 03:20:47 2014	(r263791)
@@ -41,8 +41,8 @@ f_include $BSDCFG_SHARE/networking/resol
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ MAIN
 

Modified: stable/9/usr.sbin/bsdconfig/networking/networking
==============================================================================
--- stable/9/usr.sbin/bsdconfig/networking/networking	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/networking/networking	Thu Mar 27 03:20:47 2014	(r263791)
@@ -37,8 +37,8 @@ f_include $BSDCFG_SHARE/mustberoot.subr
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking"
 f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
 
-ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
-[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
+	pgm="${ipgm:-$pgm}"
 
 ############################################################ FUNCTIONS
 

Modified: stable/9/usr.sbin/bsdconfig/networking/share/device.subr
==============================================================================
--- stable/9/usr.sbin/bsdconfig/networking/share/device.subr	Thu Mar 27 01:41:18 2014	(r263790)
+++ stable/9/usr.sbin/bsdconfig/networking/share/device.subr	Thu Mar 27 03:20:47 2014	(r263791)
@@ -40,6 +40,7 @@ f_include $BSDCFG_SHARE/networking/media
 f_include $BSDCFG_SHARE/networking/netmask.subr
 f_include $BSDCFG_SHARE/networking/resolv.subr
 f_include $BSDCFG_SHARE/networking/routing.subr
+f_include $BSDCFG_SHARE/strings.subr
 f_include $BSDCFG_SHARE/sysrc.subr
 
 BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking"
@@ -62,7 +63,8 @@ f_include_lang $BSDCFG_LIBE/$APP_DIR/inc
 #
 f_dialog_menu_netdev()

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403270320.s2R3Klqv045092>