diff --git a/usr.sbin/bsdconfig/bsdconfig b/usr.sbin/bsdconfig/bsdconfig index 419d79fb9507..90fcf86d95c2 100755 --- a/usr.sbin/bsdconfig/bsdconfig +++ b/usr.sbin/bsdconfig/bsdconfig @@ -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" diff --git a/usr.sbin/bsdconfig/console/console b/usr.sbin/bsdconfig/console/console index e2387f5f552d..e4d978c39286 100755 --- a/usr.sbin/bsdconfig/console/console +++ b/usr.sbin/bsdconfig/console/console @@ -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 diff --git a/usr.sbin/bsdconfig/console/font b/usr.sbin/bsdconfig/console/font index 9363ffd667ac..57af2e838bfc 100755 --- a/usr.sbin/bsdconfig/console/font +++ b/usr.sbin/bsdconfig/console/font @@ -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 diff --git a/usr.sbin/bsdconfig/console/keymap b/usr.sbin/bsdconfig/console/keymap index e343db9ef608..e5f6462c4d20 100755 --- a/usr.sbin/bsdconfig/console/keymap +++ b/usr.sbin/bsdconfig/console/keymap @@ -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 diff --git a/usr.sbin/bsdconfig/console/repeat b/usr.sbin/bsdconfig/console/repeat index b426d3690a75..544731581fbe 100755 --- a/usr.sbin/bsdconfig/console/repeat +++ b/usr.sbin/bsdconfig/console/repeat @@ -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 diff --git a/usr.sbin/bsdconfig/console/saver b/usr.sbin/bsdconfig/console/saver index bea046e826af..fa3bffe154d4 100755 --- a/usr.sbin/bsdconfig/console/saver +++ b/usr.sbin/bsdconfig/console/saver @@ -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 diff --git a/usr.sbin/bsdconfig/console/screenmap b/usr.sbin/bsdconfig/console/screenmap index 17de3564ff06..643e671b6145 100755 --- a/usr.sbin/bsdconfig/console/screenmap +++ b/usr.sbin/bsdconfig/console/screenmap @@ -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 diff --git a/usr.sbin/bsdconfig/console/ttys b/usr.sbin/bsdconfig/console/ttys index ad7a9c448184..77d5f1bada8a 100755 --- a/usr.sbin/bsdconfig/console/ttys +++ b/usr.sbin/bsdconfig/console/ttys @@ -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 diff --git a/usr.sbin/bsdconfig/diskmgmt/diskmgmt b/usr.sbin/bsdconfig/diskmgmt/diskmgmt index b8b97dccbeb8..26d39be9521c 100755 --- a/usr.sbin/bsdconfig/diskmgmt/diskmgmt +++ b/usr.sbin/bsdconfig/diskmgmt/diskmgmt @@ -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 diff --git a/usr.sbin/bsdconfig/docsinstall/docsinstall b/usr.sbin/bsdconfig/docsinstall/docsinstall index 141bc7f4957c..4163a4c41b65 100755 --- a/usr.sbin/bsdconfig/docsinstall/docsinstall +++ b/usr.sbin/bsdconfig/docsinstall/docsinstall @@ -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 diff --git a/usr.sbin/bsdconfig/mouse/disable b/usr.sbin/bsdconfig/mouse/disable index 2a2cfb410220..89ec1761a947 100755 --- a/usr.sbin/bsdconfig/mouse/disable +++ b/usr.sbin/bsdconfig/mouse/disable @@ -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 diff --git a/usr.sbin/bsdconfig/mouse/enable b/usr.sbin/bsdconfig/mouse/enable index 43abac5798e2..d33f1196f987 100755 --- a/usr.sbin/bsdconfig/mouse/enable +++ b/usr.sbin/bsdconfig/mouse/enable @@ -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 diff --git a/usr.sbin/bsdconfig/mouse/flags b/usr.sbin/bsdconfig/mouse/flags index 0705139af03c..d6f50e821a84 100755 --- a/usr.sbin/bsdconfig/mouse/flags +++ b/usr.sbin/bsdconfig/mouse/flags @@ -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 diff --git a/usr.sbin/bsdconfig/mouse/mouse b/usr.sbin/bsdconfig/mouse/mouse index b1bd9d9e63af..7c333c81f1b4 100755 --- a/usr.sbin/bsdconfig/mouse/mouse +++ b/usr.sbin/bsdconfig/mouse/mouse @@ -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 diff --git a/usr.sbin/bsdconfig/mouse/port b/usr.sbin/bsdconfig/mouse/port index cb4065280b44..c0bc61e0ef14 100755 --- a/usr.sbin/bsdconfig/mouse/port +++ b/usr.sbin/bsdconfig/mouse/port @@ -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 diff --git a/usr.sbin/bsdconfig/mouse/type b/usr.sbin/bsdconfig/mouse/type index f76e9311726a..92745c6313a5 100755 --- a/usr.sbin/bsdconfig/mouse/type +++ b/usr.sbin/bsdconfig/mouse/type @@ -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 diff --git a/usr.sbin/bsdconfig/networking/defaultrouter b/usr.sbin/bsdconfig/networking/defaultrouter index cc43f852231f..5b8ebdc74c67 100755 --- a/usr.sbin/bsdconfig/networking/defaultrouter +++ b/usr.sbin/bsdconfig/networking/defaultrouter @@ -49,7 +49,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) # # 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 diff --git a/usr.sbin/bsdconfig/networking/devices b/usr.sbin/bsdconfig/networking/devices index ae3136c99006..11614f036336 100755 --- a/usr.sbin/bsdconfig/networking/devices +++ b/usr.sbin/bsdconfig/networking/devices @@ -54,7 +54,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) # # 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 diff --git a/usr.sbin/bsdconfig/networking/hostname b/usr.sbin/bsdconfig/networking/hostname index 4029d3c3468b..55cc4381bde9 100755 --- a/usr.sbin/bsdconfig/networking/hostname +++ b/usr.sbin/bsdconfig/networking/hostname @@ -52,7 +52,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) # # 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 diff --git a/usr.sbin/bsdconfig/networking/nameservers b/usr.sbin/bsdconfig/networking/nameservers index aeda09e57fe4..d1b8123552d3 100755 --- a/usr.sbin/bsdconfig/networking/nameservers +++ b/usr.sbin/bsdconfig/networking/nameservers @@ -52,7 +52,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) # # 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 diff --git a/usr.sbin/bsdconfig/networking/networking b/usr.sbin/bsdconfig/networking/networking index 3697f31028cb..8c9468de6e62 100755 --- a/usr.sbin/bsdconfig/networking/networking +++ b/usr.sbin/bsdconfig/networking/networking @@ -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 diff --git a/usr.sbin/bsdconfig/packages/packages b/usr.sbin/bsdconfig/packages/packages index 3e623434e860..8c8ccc17aae9 100755 --- a/usr.sbin/bsdconfig/packages/packages +++ b/usr.sbin/bsdconfig/packages/packages @@ -55,7 +55,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) # # 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 diff --git a/usr.sbin/bsdconfig/password/password b/usr.sbin/bsdconfig/password/password index f63e455acb33..e7c3180073fe 100755 --- a/usr.sbin/bsdconfig/password/password +++ b/usr.sbin/bsdconfig/password/password @@ -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 diff --git a/usr.sbin/bsdconfig/security/kern_securelevel b/usr.sbin/bsdconfig/security/kern_securelevel index 61ad9bf0457a..ca71a1e56e3c 100755 --- a/usr.sbin/bsdconfig/security/kern_securelevel +++ b/usr.sbin/bsdconfig/security/kern_securelevel @@ -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 diff --git a/usr.sbin/bsdconfig/security/security b/usr.sbin/bsdconfig/security/security index ba9f9e2727b5..36a8aaee5e70 100755 --- a/usr.sbin/bsdconfig/security/security +++ b/usr.sbin/bsdconfig/security/security @@ -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 diff --git a/usr.sbin/bsdconfig/share/common.subr b/usr.sbin/bsdconfig/share/common.subr index d92592c30924..88594b568f67 100644 --- a/usr.sbin/bsdconfig/share/common.subr +++ b/usr.sbin/bsdconfig/share/common.subr @@ -67,6 +67,16 @@ export UNAME_R="$(uname -r)" # Release Level (i.e. X.Y-RELEASE) # : ${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) diff --git a/usr.sbin/bsdconfig/share/dialog.subr b/usr.sbin/bsdconfig/share/dialog.subr index 0f3187d21cdf..294dbf09fd56 100644 --- a/usr.sbin/bsdconfig/share/dialog.subr +++ b/usr.sbin/bsdconfig/share/dialog.subr @@ -1530,25 +1530,37 @@ 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 diff --git a/usr.sbin/bsdconfig/startup/misc b/usr.sbin/bsdconfig/startup/misc index f0b5fb0180f7..53ae2b0d5bd1 100755 --- a/usr.sbin/bsdconfig/startup/misc +++ b/usr.sbin/bsdconfig/startup/misc @@ -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 diff --git a/usr.sbin/bsdconfig/startup/rcadd b/usr.sbin/bsdconfig/startup/rcadd index a3c772427297..3a4fbaadbdd7 100755 --- a/usr.sbin/bsdconfig/startup/rcadd +++ b/usr.sbin/bsdconfig/startup/rcadd @@ -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 diff --git a/usr.sbin/bsdconfig/startup/rcconf b/usr.sbin/bsdconfig/startup/rcconf index 45316d74f6a3..4d47ea1985af 100755 --- a/usr.sbin/bsdconfig/startup/rcconf +++ b/usr.sbin/bsdconfig/startup/rcconf @@ -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 diff --git a/usr.sbin/bsdconfig/startup/rcdelete b/usr.sbin/bsdconfig/startup/rcdelete index 701877479797..5a8b21145254 100755 --- a/usr.sbin/bsdconfig/startup/rcdelete +++ b/usr.sbin/bsdconfig/startup/rcdelete @@ -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 diff --git a/usr.sbin/bsdconfig/startup/rcedit b/usr.sbin/bsdconfig/startup/rcedit index b97211ffd98b..4dea4dc96e74 100755 --- a/usr.sbin/bsdconfig/startup/rcedit +++ b/usr.sbin/bsdconfig/startup/rcedit @@ -49,7 +49,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) # # 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 diff --git a/usr.sbin/bsdconfig/startup/rcvar b/usr.sbin/bsdconfig/startup/rcvar index d0268b830d8e..e82a35b8b275 100755 --- a/usr.sbin/bsdconfig/startup/rcvar +++ b/usr.sbin/bsdconfig/startup/rcvar @@ -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 diff --git a/usr.sbin/bsdconfig/startup/startup b/usr.sbin/bsdconfig/startup/startup index 45375fe730d3..11eb9a1285e4 100755 --- a/usr.sbin/bsdconfig/startup/startup +++ b/usr.sbin/bsdconfig/startup/startup @@ -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 diff --git a/usr.sbin/bsdconfig/timezone/timezone b/usr.sbin/bsdconfig/timezone/timezone index 62dc7f7c0400..226eef7dbf6b 100755 --- a/usr.sbin/bsdconfig/timezone/timezone +++ b/usr.sbin/bsdconfig/timezone/timezone @@ -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;; diff --git a/usr.sbin/bsdconfig/ttys/ttys b/usr.sbin/bsdconfig/ttys/ttys index f0c7c2a9014b..64d776c71777 100755 --- a/usr.sbin/bsdconfig/ttys/ttys +++ b/usr.sbin/bsdconfig/ttys/ttys @@ -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 diff --git a/usr.sbin/bsdconfig/usermgmt/groupadd b/usr.sbin/bsdconfig/usermgmt/groupadd index b9bfce8bd386..0eed353729fa 100755 --- a/usr.sbin/bsdconfig/usermgmt/groupadd +++ b/usr.sbin/bsdconfig/usermgmt/groupadd @@ -47,7 +47,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) # # 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 diff --git a/usr.sbin/bsdconfig/usermgmt/groupdel b/usr.sbin/bsdconfig/usermgmt/groupdel index ff6b702d3c83..e5a759f948ef 100755 --- a/usr.sbin/bsdconfig/usermgmt/groupdel +++ b/usr.sbin/bsdconfig/usermgmt/groupdel @@ -50,7 +50,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) # # 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 diff --git a/usr.sbin/bsdconfig/usermgmt/groupedit b/usr.sbin/bsdconfig/usermgmt/groupedit index 7cd70c6d4e53..ba249c34b7e7 100755 --- a/usr.sbin/bsdconfig/usermgmt/groupedit +++ b/usr.sbin/bsdconfig/usermgmt/groupedit @@ -50,7 +50,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) # # 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 diff --git a/usr.sbin/bsdconfig/usermgmt/useradd b/usr.sbin/bsdconfig/usermgmt/useradd index 1dbf0cd92e20..113caaa06762 100755 --- a/usr.sbin/bsdconfig/usermgmt/useradd +++ b/usr.sbin/bsdconfig/usermgmt/useradd @@ -47,7 +47,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) # # 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 diff --git a/usr.sbin/bsdconfig/usermgmt/userdel b/usr.sbin/bsdconfig/usermgmt/userdel index 3847a1aa14a6..05b160ff1917 100755 --- a/usr.sbin/bsdconfig/usermgmt/userdel +++ b/usr.sbin/bsdconfig/usermgmt/userdel @@ -50,7 +50,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) # # 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 diff --git a/usr.sbin/bsdconfig/usermgmt/useredit b/usr.sbin/bsdconfig/usermgmt/useredit index 60e1476f750d..60a33777e3c3 100755 --- a/usr.sbin/bsdconfig/usermgmt/useredit +++ b/usr.sbin/bsdconfig/usermgmt/useredit @@ -50,7 +50,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) # # 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 diff --git a/usr.sbin/bsdconfig/usermgmt/usermgmt b/usr.sbin/bsdconfig/usermgmt/usermgmt index 3c5a5ef9c8fb..06144e1561b3 100755 --- a/usr.sbin/bsdconfig/usermgmt/usermgmt +++ b/usr.sbin/bsdconfig/usermgmt/usermgmt @@ -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