Date: Tue, 14 May 2013 03:21:14 +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: r250633 - in head/usr.sbin/bsdconfig: . console diskmgmt docsinstall mouse networking packages password security share startup timezone ttys usermgmt Message-ID: <201305140321.r4E3LEHH024689@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dteske Date: Tue May 14 03:21:13 2013 New Revision: 250633 URL: http://svnweb.freebsd.org/changeset/base/250633 Log: Centralize standard getopts arguments, both for convenience and to correct a bug in which certain combinations of arguments produced unexpected results such as `-dX' (now properly produces debugging and X11), `-XS' (now properly produces X11 in secure mode), `-df-' (enables debugging when reading a script from standard-input, etc. Multi-word variations such as `-d -X', `-X -S', `-d -f-', `-d -f -', etc. also work as expected. Also tested were variations in argument order, which are now working as expected. Modified: head/usr.sbin/bsdconfig/bsdconfig head/usr.sbin/bsdconfig/console/console head/usr.sbin/bsdconfig/console/font head/usr.sbin/bsdconfig/console/keymap head/usr.sbin/bsdconfig/console/repeat head/usr.sbin/bsdconfig/console/saver head/usr.sbin/bsdconfig/console/screenmap head/usr.sbin/bsdconfig/console/ttys head/usr.sbin/bsdconfig/diskmgmt/diskmgmt head/usr.sbin/bsdconfig/docsinstall/docsinstall head/usr.sbin/bsdconfig/mouse/disable head/usr.sbin/bsdconfig/mouse/enable head/usr.sbin/bsdconfig/mouse/flags head/usr.sbin/bsdconfig/mouse/mouse head/usr.sbin/bsdconfig/mouse/port head/usr.sbin/bsdconfig/mouse/type head/usr.sbin/bsdconfig/networking/defaultrouter head/usr.sbin/bsdconfig/networking/devices head/usr.sbin/bsdconfig/networking/hostname head/usr.sbin/bsdconfig/networking/nameservers head/usr.sbin/bsdconfig/networking/networking head/usr.sbin/bsdconfig/packages/packages head/usr.sbin/bsdconfig/password/password head/usr.sbin/bsdconfig/security/kern_securelevel head/usr.sbin/bsdconfig/security/security head/usr.sbin/bsdconfig/share/common.subr head/usr.sbin/bsdconfig/share/dialog.subr head/usr.sbin/bsdconfig/startup/misc head/usr.sbin/bsdconfig/startup/rcadd head/usr.sbin/bsdconfig/startup/rcconf head/usr.sbin/bsdconfig/startup/rcdelete head/usr.sbin/bsdconfig/startup/rcedit head/usr.sbin/bsdconfig/startup/rcvar head/usr.sbin/bsdconfig/startup/startup head/usr.sbin/bsdconfig/timezone/timezone head/usr.sbin/bsdconfig/ttys/ttys head/usr.sbin/bsdconfig/usermgmt/groupadd head/usr.sbin/bsdconfig/usermgmt/groupdel head/usr.sbin/bsdconfig/usermgmt/groupedit head/usr.sbin/bsdconfig/usermgmt/useradd head/usr.sbin/bsdconfig/usermgmt/userdel head/usr.sbin/bsdconfig/usermgmt/useredit head/usr.sbin/bsdconfig/usermgmt/usermgmt Modified: head/usr.sbin/bsdconfig/bsdconfig ============================================================================== --- head/usr.sbin/bsdconfig/bsdconfig Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/bsdconfig Tue May 14 03:21:13 2013 (r250633) @@ -239,7 +239,7 @@ fi # Process command-line arguments # scripts_loaded=0 -while getopts dD:f:hSX flag; do +while getopts f:h$GETOPTS_STDARGS flag; do case "$flag" in f) [ $scripts_loaded -eq 0 ] && f_include $BSDCFG_SHARE/script.subr f_script_load "$OPTARG" Modified: head/usr.sbin/bsdconfig/console/console ============================================================================== --- head/usr.sbin/bsdconfig/console/console Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/console/console Tue May 14 03:21:13 2013 (r250633) @@ -95,7 +95,7 @@ dialog_menu_main() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/console/font ============================================================================== --- head/usr.sbin/bsdconfig/console/font Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/console/font Tue May 14 03:21:13 2013 (r250633) @@ -119,7 +119,7 @@ dialog_menu_main() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/console/keymap ============================================================================== --- head/usr.sbin/bsdconfig/console/keymap Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/console/keymap Tue May 14 03:21:13 2013 (r250633) @@ -217,7 +217,7 @@ dialog_menu_main() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/console/repeat ============================================================================== --- head/usr.sbin/bsdconfig/console/repeat Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/console/repeat Tue May 14 03:21:13 2013 (r250633) @@ -99,7 +99,7 @@ dialog_menu_main() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/console/saver ============================================================================== --- head/usr.sbin/bsdconfig/console/saver Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/console/saver Tue May 14 03:21:13 2013 (r250633) @@ -118,7 +118,7 @@ dialog_menu_main() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/console/screenmap ============================================================================== --- head/usr.sbin/bsdconfig/console/screenmap Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/console/screenmap Tue May 14 03:21:13 2013 (r250633) @@ -103,7 +103,7 @@ dialog_menu_main() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/console/ttys ============================================================================== --- head/usr.sbin/bsdconfig/console/ttys Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/console/ttys Tue May 14 03:21:13 2013 (r250633) @@ -163,7 +163,7 @@ ttys_set_type() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/diskmgmt/diskmgmt ============================================================================== --- head/usr.sbin/bsdconfig/diskmgmt/diskmgmt Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/diskmgmt/diskmgmt Tue May 14 03:21:13 2013 (r250633) @@ -56,7 +56,7 @@ X11TERM_OPTS= # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/docsinstall/docsinstall ============================================================================== --- head/usr.sbin/bsdconfig/docsinstall/docsinstall Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/docsinstall/docsinstall Tue May 14 03:21:13 2013 (r250633) @@ -56,7 +56,7 @@ X11TERM_OPTS= # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/mouse/disable ============================================================================== --- head/usr.sbin/bsdconfig/mouse/disable Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/mouse/disable Tue May 14 03:21:13 2013 (r250633) @@ -56,7 +56,7 @@ MOUSED_PIDFILE=/var/run/moused.pid # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/mouse/enable ============================================================================== --- head/usr.sbin/bsdconfig/mouse/enable Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/mouse/enable Tue May 14 03:21:13 2013 (r250633) @@ -56,7 +56,7 @@ MOUSED_PIDFILE=/var/run/moused.pid # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/mouse/flags ============================================================================== --- head/usr.sbin/bsdconfig/mouse/flags Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/mouse/flags Tue May 14 03:21:13 2013 (r250633) @@ -56,7 +56,7 @@ MOUSED_PIDFILE=/var/run/moused.pid # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/mouse/mouse ============================================================================== --- head/usr.sbin/bsdconfig/mouse/mouse Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/mouse/mouse Tue May 14 03:21:13 2013 (r250633) @@ -94,7 +94,7 @@ dialog_menu_main() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/mouse/port ============================================================================== --- head/usr.sbin/bsdconfig/mouse/port Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/mouse/port Tue May 14 03:21:13 2013 (r250633) @@ -103,7 +103,7 @@ dialog_menu_main() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/mouse/type ============================================================================== --- head/usr.sbin/bsdconfig/mouse/type Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/mouse/type Tue May 14 03:21:13 2013 (r250633) @@ -111,7 +111,7 @@ dialog_menu_main() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/networking/defaultrouter ============================================================================== --- head/usr.sbin/bsdconfig/networking/defaultrouter Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/networking/defaultrouter Tue May 14 03:21:13 2013 (r250633) @@ -49,7 +49,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_ # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/networking/devices ============================================================================== --- head/usr.sbin/bsdconfig/networking/devices Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/networking/devices Tue May 14 03:21:13 2013 (r250633) @@ -54,7 +54,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_ # # Process command-line options # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/networking/hostname ============================================================================== --- head/usr.sbin/bsdconfig/networking/hostname Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/networking/hostname Tue May 14 03:21:13 2013 (r250633) @@ -52,7 +52,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_ # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/networking/nameservers ============================================================================== --- head/usr.sbin/bsdconfig/networking/nameservers Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/networking/nameservers Tue May 14 03:21:13 2013 (r250633) @@ -52,7 +52,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_ # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/networking/networking ============================================================================== --- head/usr.sbin/bsdconfig/networking/networking Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/networking/networking Tue May 14 03:21:13 2013 (r250633) @@ -91,7 +91,7 @@ dialog_menu_main() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/packages/packages ============================================================================== --- head/usr.sbin/bsdconfig/packages/packages Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/packages/packages Tue May 14 03:21:13 2013 (r250633) @@ -55,7 +55,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_ # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/password/password ============================================================================== --- head/usr.sbin/bsdconfig/password/password Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/password/password Tue May 14 03:21:13 2013 (r250633) @@ -55,7 +55,7 @@ USER_ROOT=root # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/security/kern_securelevel ============================================================================== --- head/usr.sbin/bsdconfig/security/kern_securelevel Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/security/kern_securelevel Tue May 14 03:21:13 2013 (r250633) @@ -108,7 +108,7 @@ dialog_menu_main() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/security/security ============================================================================== --- head/usr.sbin/bsdconfig/security/security Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/security/security Tue May 14 03:21:13 2013 (r250633) @@ -133,7 +133,7 @@ dialog_menu_main() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/common.subr Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/share/common.subr Tue May 14 03:21:13 2013 (r250633) @@ -67,6 +67,16 @@ export UNAME_R="$(uname -r)" # Release L # : ${DEBUG_SELF_INITIALIZE=1} +# +# Define standard optstring arguments that should be supported by all programs +# using this include (unless DEBUG_SELF_INITIALIZE is set to NULL to prevent +# f_debug_init() from autamatically processing "$@" for the below arguments): +# +# d Sets $debug to 1 +# D: Sets $debugFile to $OPTARG +# +GETOPTS_STDARGS="dD:" + ############################################################ FUNCTIONS # f_dprintf $fmt [ $opts ... ] @@ -102,7 +112,9 @@ f_debug_init() # set -- $ARGV local OPTIND - while getopts dD: flag > /dev/null; do + f_dprintf "f_debug_init: ARGV=[%s] GETOPTS_STDARGS=[%s]" \ + "$ARGV" "$GETOPTS_STDARGS" + while getopts "$GETOPTS_STDARGS" flag > /dev/null; do case "$flag" in d) debug=1;; D) debugFile="$OPTARG";; @@ -110,6 +122,8 @@ f_debug_init() esac done shift $(( $OPTIND - 1 )) + f_dprintf "f_debug_init: debug=[%s] debugFile=[%s]" \ + "$debug" "$debugFile" # # Automagically enable debugging if debugFile is set (and non-NULL) Modified: head/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/dialog.subr Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/share/dialog.subr Tue May 14 03:21:13 2013 (r250633) @@ -1531,24 +1531,36 @@ f_dialog_init() eval exec $DIALOG_TERMINAL_PASSTHRU_FD\>\&1 # + # Add `-S' and `-X' to the list of standard arguments supported by all + # + case "$GETOPTS_STDARGS" in + *SX*) : good ;; # already present + *) GETOPTS_STDARGS="${GETOPTS_STDARGS}SX" + esac + + # # Process stored command-line arguments # - SECURE=$( set -- "$ARGV" - while getopts S flag > /dev/null; do + f_dprintf "f_dialog_init: ARGV=[%s] GETOPTS_STDARGS=[%s]" \ + "$ARGV" "$GETOPTS_STDARGS" + SECURE=$( set -- $ARGV + while getopts "$GETOPTS_STDARGS" flag > /dev/null; do case "$flag" in S) echo 1;; \?) continue;; esac done ) - USE_XDIALOG=$( set -- "$ARGV" - while getopts SX flag > /dev/null; do + USE_XDIALOG=$( set -- $ARGV + while getopts $GETOPTS_STDARGS flag > /dev/null; do case "$flag" in S|X) echo 1;; \?) continue;; esac done ) + f_dprintf "f_dialog_init: SECURE=[%s] USE_XDIALOG=[%s]" \ + "$SECURE" "$USE_XDIALOG" # # Process `-X' command-line option Modified: head/usr.sbin/bsdconfig/startup/misc ============================================================================== --- head/usr.sbin/bsdconfig/startup/misc Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/startup/misc Tue May 14 03:21:13 2013 (r250633) @@ -319,7 +319,7 @@ dialog_input_value() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/startup/rcadd ============================================================================== --- head/usr.sbin/bsdconfig/startup/rcadd Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/startup/rcadd Tue May 14 03:21:13 2013 (r250633) @@ -97,7 +97,7 @@ dialog_menu_main() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/startup/rcconf ============================================================================== --- head/usr.sbin/bsdconfig/startup/rcconf Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/startup/rcconf Tue May 14 03:21:13 2013 (r250633) @@ -201,7 +201,7 @@ dialog_menu_main() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/startup/rcdelete ============================================================================== --- head/usr.sbin/bsdconfig/startup/rcdelete Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/startup/rcdelete Tue May 14 03:21:13 2013 (r250633) @@ -301,7 +301,7 @@ dialog_menu_confirm_delete() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/startup/rcedit ============================================================================== --- head/usr.sbin/bsdconfig/startup/rcedit Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/startup/rcedit Tue May 14 03:21:13 2013 (r250633) @@ -49,7 +49,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_ # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/startup/rcvar ============================================================================== --- head/usr.sbin/bsdconfig/startup/rcvar Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/startup/rcvar Tue May 14 03:21:13 2013 (r250633) @@ -161,7 +161,7 @@ dialog_menu_main() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/startup/startup ============================================================================== --- head/usr.sbin/bsdconfig/startup/startup Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/startup/startup Tue May 14 03:21:13 2013 (r250633) @@ -92,7 +92,7 @@ dialog_menu_main() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/timezone/timezone ============================================================================== --- head/usr.sbin/bsdconfig/timezone/timezone Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/timezone/timezone Tue May 14 03:21:13 2013 (r250633) @@ -117,7 +117,7 @@ dialog_menu_main() # # Process command-line arguments # -while getopts C:dD:ehnrsSvX flag; do +while getopts C:ehnrsv$GETOPTS_STDARGS flag; do case "$flag" in C) CHROOTENV="$OPTARG";; e) TZ_OR_FAIL=1;; Modified: head/usr.sbin/bsdconfig/ttys/ttys ============================================================================== --- head/usr.sbin/bsdconfig/ttys/ttys Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/ttys/ttys Tue May 14 03:21:13 2013 (r250633) @@ -67,7 +67,7 @@ ETC_TTYS=/etc/ttys # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/usermgmt/groupadd ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/groupadd Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/usermgmt/groupadd Tue May 14 03:21:13 2013 (r250633) @@ -47,7 +47,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_ # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/usermgmt/groupdel ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/groupdel Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/usermgmt/groupdel Tue May 14 03:21:13 2013 (r250633) @@ -50,7 +50,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_ # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/usermgmt/groupedit ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/groupedit Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/usermgmt/groupedit Tue May 14 03:21:13 2013 (r250633) @@ -50,7 +50,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_ # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/usermgmt/useradd ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/useradd Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/usermgmt/useradd Tue May 14 03:21:13 2013 (r250633) @@ -47,7 +47,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_ # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/usermgmt/userdel ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/userdel Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/usermgmt/userdel Tue May 14 03:21:13 2013 (r250633) @@ -50,7 +50,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_ # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/usermgmt/useredit ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/useredit Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/usermgmt/useredit Tue May 14 03:21:13 2013 (r250633) @@ -50,7 +50,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_ # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac Modified: head/usr.sbin/bsdconfig/usermgmt/usermgmt ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/usermgmt Tue May 14 01:27:56 2013 (r250632) +++ head/usr.sbin/bsdconfig/usermgmt/usermgmt Tue May 14 03:21:13 2013 (r250633) @@ -111,7 +111,7 @@ dialog_menu_main() # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305140321.r4E3LEHH024689>