diff options
author | dteske <dteske@FreeBSD.org> | 2013-05-14 03:21:13 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2013-05-14 03:21:13 +0000 |
commit | 7c4460149dcf39ce45a63a428447da0574a29ddf (patch) | |
tree | 3e3774586a73d5c2921a5c3209867c7f40baf2a1 /usr.sbin/bsdconfig/security | |
parent | cc1a3599913049d157572c1dac7420d275fa208a (diff) | |
download | FreeBSD-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/security')
-rwxr-xr-x | usr.sbin/bsdconfig/security/kern_securelevel | 2 | ||||
-rwxr-xr-x | usr.sbin/bsdconfig/security/security | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bsdconfig/security/kern_securelevel b/usr.sbin/bsdconfig/security/kern_securelevel index 61ad9bf..ca71a1e 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 ba9f9e2..36a8aae 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 |