summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdconfig/console
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2013-05-14 03:21:13 +0000
committerdteske <dteske@FreeBSD.org>2013-05-14 03:21:13 +0000
commit7c4460149dcf39ce45a63a428447da0574a29ddf (patch)
tree3e3774586a73d5c2921a5c3209867c7f40baf2a1 /usr.sbin/bsdconfig/console
parentcc1a3599913049d157572c1dac7420d275fa208a (diff)
downloadFreeBSD-src-7c4460149dcf39ce45a63a428447da0574a29ddf.zip
FreeBSD-src-7c4460149dcf39ce45a63a428447da0574a29ddf.tar.gz
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.
Diffstat (limited to 'usr.sbin/bsdconfig/console')
-rwxr-xr-xusr.sbin/bsdconfig/console/console2
-rwxr-xr-xusr.sbin/bsdconfig/console/font2
-rwxr-xr-xusr.sbin/bsdconfig/console/keymap2
-rwxr-xr-xusr.sbin/bsdconfig/console/repeat2
-rwxr-xr-xusr.sbin/bsdconfig/console/saver2
-rwxr-xr-xusr.sbin/bsdconfig/console/screenmap2
-rwxr-xr-xusr.sbin/bsdconfig/console/ttys2
7 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/bsdconfig/console/console b/usr.sbin/bsdconfig/console/console
index e2387f5..e4d978c 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 9363ffd..57af2e8 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 e343db9..e5f6462 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 b426d36..5447315 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 bea046e..fa3bffe 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 17de356..643e671 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 ad7a9c4..77d5f1b 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
OpenPOWER on IntegriCloud