svn commit: r249746 - in head/usr.sbin/bsdconfig: . console diskmgmt docsinstall dot mouse networking password security share startup timezone ttys usermgmt
Devin Teske
dteske at FreeBSD.org
Mon Apr 22 05:02:45 UTC 2013
Author: dteske
Date: Mon Apr 22 05:02:34 2013
New Revision: 249746
URL: http://svnweb.freebsd.org/changeset/base/249746
Log:
Add new flags `-d' (sets debug=1) and `-D file' (sets debugFile) and
improve debugging initialization. Also fixup USAGE statements while we're
here. Also, change initialization of main program to _not_ change working
directory, allowing the debugFile to be relative without confusion.
Modified:
head/usr.sbin/bsdconfig/USAGE
head/usr.sbin/bsdconfig/bsdconfig
head/usr.sbin/bsdconfig/console/USAGE
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/USAGE
head/usr.sbin/bsdconfig/diskmgmt/diskmgmt
head/usr.sbin/bsdconfig/docsinstall/USAGE
head/usr.sbin/bsdconfig/docsinstall/docsinstall
head/usr.sbin/bsdconfig/dot/USAGE
head/usr.sbin/bsdconfig/dot/dot
head/usr.sbin/bsdconfig/mouse/USAGE
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/USAGE
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/password/USAGE
head/usr.sbin/bsdconfig/password/password
head/usr.sbin/bsdconfig/security/USAGE
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/mustberoot.subr
head/usr.sbin/bsdconfig/startup/USAGE
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/USAGE
head/usr.sbin/bsdconfig/timezone/timezone
head/usr.sbin/bsdconfig/ttys/USAGE
head/usr.sbin/bsdconfig/ttys/ttys
head/usr.sbin/bsdconfig/usermgmt/USAGE
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/USAGE
==============================================================================
--- head/usr.sbin/bsdconfig/USAGE Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/USAGE Mon Apr 22 05:02:34 2013 (r249746)
@@ -31,10 +31,14 @@ Usage:
@PROGRAM_NAME@ [OPTIONS] [command [OPTIONS]]
OPTIONS:
+ -d Provide lots of debugging info on standard-out when running.
+ -D file Send debugging info to file. If file begins with a plus-sign
+ debug info is sent to both standard-out and file (minus the
+ leading plus).
-f file Load file as script and then exit. If multiple occurrences,
program will only exit after last occurrence. If file is a
single dash (`-'), @PROGRAM_NAME@ reads from standard input.
- -h Print usage statement and exit.
+ -h Print this usage statement and exit.
-S Secure X11 mode (implies `-X'). As root, always prompt-for
and validate sudo(8) username/password before starting.
-X Use Xdialog(1) in place of dialog(1).
Modified: head/usr.sbin/bsdconfig/bsdconfig
==============================================================================
--- head/usr.sbin/bsdconfig/bsdconfig Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/bsdconfig Mon Apr 22 05:02:34 2013 (r249746)
@@ -53,6 +53,7 @@ usage()
local index="INDEX" cmd_list=""
cd $BSDCFG_LIBE
+ # No need to preserve CWD (headed toward exit)
# Test for language-specific indices
f_quietly ls */"$index.${LANG:-$LC_ALL}" &&
@@ -131,6 +132,8 @@ usage()
f_usage $BSDCFG_LIBE/USAGE \
"PROGRAM_NAME" "$pgm" \
"COMMAND_LIST" "$cmd_list"
+
+ # Never reached
}
# dialog_menu_main
@@ -152,14 +155,14 @@ dialog_menu_main()
local sanitize_awk="{ gsub(/'/, \"'\\\\''\"); print }"
local menuitem menu_title menu_help menu_selection index=2
- for menuitem in $( ls -d [0-9][0-9][0-9].* ); do
+ for menuitem in $( cd $BSDCFG_LIBE && ls -d [0-9][0-9][0-9].* ); do
[ $index -lt ${#DIALOG_MENU_TAGS} ] || break
tag=$( f_substr "$DIALOG_MENU_TAGS" $index 1 )
menu_program=
menu_title=
menu_help=
- f_include_lang $menuitem/INDEX
+ f_include_lang $BSDCFG_LIBE/$menuitem/INDEX
[ "$menu_program" ] || continue
case "$menu_program" in
@@ -231,7 +234,7 @@ fi
# Process command-line arguments
#
scripts_loaded=0
-while getopts f:hSX flag; do
+while getopts dD:f:hSX flag; do
case "$flag" in
f) [ $scripts_loaded -eq 0 ] && f_include $BSDCFG_SHARE/script.subr
f_script_load "$OPTARG"
@@ -254,8 +257,6 @@ f_dialog_title "$msg_main_menu"
# Incorporate rc-file if it exists
[ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc"
-cd $BSDCFG_LIBE || f_die 1 "$msg_directory_not_found" "$BSDCFG_LIBE"
-
#
# If a non-option argument was passed, process it as a menuitem selection...
#
Modified: head/usr.sbin/bsdconfig/console/USAGE
==============================================================================
--- head/usr.sbin/bsdconfig/console/USAGE Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/console/USAGE Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,4 +1,4 @@
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,11 @@
Usage: bsdconfig @PROGRAM_NAME@ [OPTIONS]
OPTIONS:
- -h Print usage statement and exit.
+ -d Provide lots of debugging info on standard-out when running.
+ -D file Send debugging info to file. If file begins with a plus-sign
+ debug info is sent to both standard-out and file (minus the
+ leading plus).
+ -h Print this usage statement and exit.
-S Secure X11 mode (implies `-X'). As root, always prompt-for
and validate sudo(8) username/password before starting.
-X Use Xdialog(1) in place of dialog(1).
Modified: head/usr.sbin/bsdconfig/console/console
==============================================================================
--- head/usr.sbin/bsdconfig/console/console Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/console/console Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -93,7 +93,7 @@ dialog_menu_main()
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/console/font Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -101,7 +101,7 @@ dialog_menu_main()
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/console/keymap Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -141,7 +141,7 @@ dialog_menu_main()
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/console/repeat Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -91,7 +91,7 @@ dialog_menu_main()
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/console/saver Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -101,7 +101,7 @@ dialog_menu_main()
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/console/screenmap Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -93,7 +93,7 @@ dialog_menu_main()
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/console/ttys Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -163,7 +163,7 @@ ttys_set_type()
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX flag; do
case "$flag" in
h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";;
esac
Modified: head/usr.sbin/bsdconfig/diskmgmt/USAGE
==============================================================================
--- head/usr.sbin/bsdconfig/diskmgmt/USAGE Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/diskmgmt/USAGE Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,4 +1,4 @@
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,11 @@
Usage: bsdconfig @PROGRAM_NAME@ [OPTIONS]
OPTIONS:
- -h Print usage statement and exit.
+ -d Provide lots of debugging info on standard-out when running.
+ -D file Send debugging info to file. If file begins with a plus-sign
+ debug info is sent to both standard-out and file (minus the
+ leading plus).
+ -h Print this usage statement and exit.
-S Secure X11 mode (implies `-X'). As root, always prompt-for
and validate sudo(8) username/password before starting.
-X Use Xdialog(1) in place of dialog(1).
Modified: head/usr.sbin/bsdconfig/diskmgmt/diskmgmt
==============================================================================
--- head/usr.sbin/bsdconfig/diskmgmt/diskmgmt Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/diskmgmt/diskmgmt Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,7 @@ X11TERM_OPTS=
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX flag; do
case "$flag" in
h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";;
esac
Modified: head/usr.sbin/bsdconfig/docsinstall/USAGE
==============================================================================
--- head/usr.sbin/bsdconfig/docsinstall/USAGE Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/docsinstall/USAGE Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,4 +1,4 @@
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,11 @@
Usage: bsdconfig @PROGRAM_NAME@ [OPTIONS]
OPTIONS:
- -h Print usage statement and exit.
+ -d Provide lots of debugging info on standard-out when running.
+ -D file Send debugging info to file. If file begins with a plus-sign
+ debug info is sent to both standard-out and file (minus the
+ leading plus).
+ -h Print this usage statement and exit.
-S Secure X11 mode (implies `-X'). As root, always prompt-for
and validate sudo(8) username/password before starting.
-X Use Xdialog(1) in place of dialog(1).
Modified: head/usr.sbin/bsdconfig/docsinstall/docsinstall
==============================================================================
--- head/usr.sbin/bsdconfig/docsinstall/docsinstall Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/docsinstall/docsinstall Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,7 @@ X11TERM_OPTS=
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX flag; do
case "$flag" in
h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";;
esac
Modified: head/usr.sbin/bsdconfig/dot/USAGE
==============================================================================
--- head/usr.sbin/bsdconfig/dot/USAGE Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/dot/USAGE Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,4 +1,4 @@
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,7 @@
Usage: bsdconfig @PROGRAM_NAME@ [OPTIONS]
OPTIONS:
- -h Print usage statement and exit.
+ -h Print this usage statement and exit.
-c Don't show command-line shortcut relationships.
-d Don't show the date in the graph label.
-i Don't show include relationships.
Modified: head/usr.sbin/bsdconfig/dot/dot
==============================================================================
--- head/usr.sbin/bsdconfig/dot/dot Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/dot/dot Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -28,6 +28,11 @@
#
############################################################ INCLUDES
+# Prevent common.subr from auto initializing debugging (this is not an inter-
+# active utility that requires debugging; also `-d' has been repurposed).
+#
+DEBUG_SELF_INITIALIZE=NO
+
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
f_dprintf "%s: loading includes..." "$0"
Modified: head/usr.sbin/bsdconfig/mouse/USAGE
==============================================================================
--- head/usr.sbin/bsdconfig/mouse/USAGE Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/mouse/USAGE Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,4 +1,4 @@
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,11 @@
Usage: bsdconfig @PROGRAM_NAME@ [OPTIONS]
OPTIONS:
- -h Print usage statement and exit.
+ -d Provide lots of debugging info on standard-out when running.
+ -D file Send debugging info to file. If file begins with a plus-sign
+ debug info is sent to both standard-out and file (minus the
+ leading plus).
+ -h Print this usage statement and exit.
-S Secure X11 mode (implies `-X'). As root, always prompt-for
and validate sudo(8) username/password before starting.
-X Use Xdialog(1) in place of dialog(1).
Modified: head/usr.sbin/bsdconfig/mouse/disable
==============================================================================
--- head/usr.sbin/bsdconfig/mouse/disable Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/mouse/disable Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,7 @@ MOUSED_PIDFILE=/var/run/moused.pid
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/mouse/enable Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,7 @@ MOUSED_PIDFILE=/var/run/moused.pid
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/mouse/flags Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,7 @@ MOUSED_PIDFILE=/var/run/moused.pid
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/mouse/mouse Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -92,7 +92,7 @@ dialog_menu_main()
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/mouse/port Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -93,7 +93,7 @@ dialog_menu_main()
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/mouse/type Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -97,7 +97,7 @@ dialog_menu_main()
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX flag; do
case "$flag" in
h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";;
esac
Modified: head/usr.sbin/bsdconfig/networking/USAGE
==============================================================================
--- head/usr.sbin/bsdconfig/networking/USAGE Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/networking/USAGE Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,4 +1,4 @@
-# Copyright (c) 2006-2012 Devin Teske
+# Copyright (c) 2006-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,11 @@
Usage: bsdconfig @PROGRAM_NAME@ [OPTIONS]
OPTIONS:
- -h Print usage statement and exit.
+ -d Provide lots of debugging info on standard-out when running.
+ -D file Send debugging info to file. If file begins with a plus-sign
+ debug info is sent to both standard-out and file (minus the
+ leading plus).
+ -h Print this usage statement and exit.
-S Secure X11 mode (implies `-X'). As root, always prompt-for
and validate sudo(8) username/password before starting.
-X Use Xdialog(1) in place of dialog(1).
Modified: head/usr.sbin/bsdconfig/networking/defaultrouter
==============================================================================
--- head/usr.sbin/bsdconfig/networking/defaultrouter Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/networking/defaultrouter Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2006-2012 Devin Teske
+# Copyright (c) 2006-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -49,7 +49,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/networking/devices Mon Apr 22 05:02:34 2013 (r249746)
@@ -54,7 +54,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_
#
# Process command-line options
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/networking/hostname Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2006-2012 Devin Teske
+# Copyright (c) 2006-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -49,7 +49,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/networking/nameservers Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2006-2012 Devin Teske
+# Copyright (c) 2006-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -49,7 +49,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/networking/networking Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2006-2012 Devin Teske
+# Copyright (c) 2006-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -89,7 +89,7 @@ dialog_menu_main()
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX flag; do
case "$flag" in
h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";;
esac
Modified: head/usr.sbin/bsdconfig/password/USAGE
==============================================================================
--- head/usr.sbin/bsdconfig/password/USAGE Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/password/USAGE Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,4 +1,4 @@
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,11 @@
Usage: bsdconfig @PROGRAM_NAME@ [OPTIONS]
OPTIONS:
- -h Print usage statement and exit.
+ -d Provide lots of debugging info on standard-out when running.
+ -D file Send debugging info to file. If file begins with a plus-sign
+ debug info is sent to both standard-out and file (minus the
+ leading plus).
+ -h Print this usage statement and exit.
-S Secure X11 mode (implies `-X'). As root, always prompt-for
and validate sudo(8) username/password before starting.
-X Use Xdialog(1) in place of dialog(1).
Modified: head/usr.sbin/bsdconfig/password/password
==============================================================================
--- head/usr.sbin/bsdconfig/password/password Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/password/password Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -55,7 +55,7 @@ USER_ROOT=root
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX flag; do
case "$flag" in
h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";;
esac
Modified: head/usr.sbin/bsdconfig/security/USAGE
==============================================================================
--- head/usr.sbin/bsdconfig/security/USAGE Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/security/USAGE Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,4 +1,4 @@
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,11 @@
Usage: bsdconfig @PROGRAM_NAME@ [OPTIONS]
OPTIONS:
- -h Print usage statement and exit.
+ -d Provide lots of debugging info on standard-out when running.
+ -D file Send debugging info to file. If file begins with a plus-sign
+ debug info is sent to both standard-out and file (minus the
+ leading plus).
+ -h Print this usage statement and exit.
-S Secure X11 mode (implies `-X'). As root, always prompt-for
and validate sudo(8) username/password before starting.
-X Use Xdialog(1) in place of dialog(1).
Modified: head/usr.sbin/bsdconfig/security/kern_securelevel
==============================================================================
--- head/usr.sbin/bsdconfig/security/kern_securelevel Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/security/kern_securelevel Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -97,7 +97,7 @@ dialog_menu_main()
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/security/security Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -111,7 +111,7 @@ dialog_menu_main()
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/share/common.subr Mon Apr 22 05:02:34 2013 (r249746)
@@ -62,6 +62,11 @@ export UNAME_S="$(uname -s)" # Operating
export UNAME_P="$(uname -p)" # Processor Architecture (i.e. i386)
export UNAME_R="$(uname -r)" # Release Level (i.e. X.Y-RELEASE)
+#
+# Default behavior is to call f_debug_init() automatically when loaded.
+#
+: ${DEBUG_SELF_INITIALIZE=1}
+
############################################################ FUNCTIONS
# f_dprintf $fmt [ $opts ... ]
@@ -86,6 +91,59 @@ f_dprintf()
return $SUCCESS
}
+# f_debug_init
+#
+# Initialize debugging. Truncates $debugFile to zero bytes if set.
+#
+f_debug_init()
+{
+ #
+ # Process stored command-line arguments
+ #
+ ( set -- "$ARGV"
+ while getopts d flag > /dev/null; do
+ case "$flag" in
+ d) true; exit;;
+ \?) continue;;
+ esac
+ done
+ false
+ ) && debug=1
+ debugFile=$( set -- "$ARGV"
+ while getopts D flag > /dev/null; do
+ case "$flag" in
+ D) echo "$OPTARG";;
+ \?) continue;;
+ esac
+ done
+ )
+
+ #
+ # Make debugging persistant if set
+ #
+ [ "$debug" ] && export debug
+
+ #
+ # Truncate the debug file upon. Note that we will trim a leading plus
+ # (`+') from the value of debugFile to support persistant meaning that
+ # f_dprintf() should print both to standard output and $debugFile
+ # (minus the leading plus, of course).
+ #
+ local _debug_file="${debugFile#+}"
+ if [ "$_debug_file" ]; then
+ if ( umask 022 && :> "$_debug_file" ); then
+ f_dprintf "Successfully initialized debugFile \`%s'" \
+ "$_debug_file"
+ [ "${debug+set}" ] ||
+ debug=1 # turn debugging on if not set
+ else
+ unset debugFile
+ f_dprintf "Unable to initialize debugFile \`%s'" \
+ "$_debug_file"
+ fi
+ fi
+}
+
# f_err $fmt [ $opts ... ]
#
# Print a message to stderr (fd=2).
@@ -615,28 +673,14 @@ eval exec $TERMINAL_STDOUT_PASSTHRU\>\&1
eval exec $TERMINAL_STDERR_PASSTHRU\>\&2
#
-# Make debugging persistant if set
-#
-[ "$debug" ] && export debug
-
-#
-# Truncate the debug file upon initialization (now). Note that we will trim a
-# leading plus (`+') from the value of debugFile to support persistant meaning
-# that f_dprintf() should print both to standard output and $debugFile (minus
-# the leading plus, of course).
+# Self-initialize unless requested otherwise
#
-_debug_file="${debugFile#+}"
-if [ "$_debug_file" ]; then
- if ( umask 022 && :> "$_debug_file" ); then
- f_dprintf "Successfully initialized debugFile \`%s'" \
- "$_debug_file"
- else
- unset debugFile
- f_dprintf "Unable to initialize debugFile \`%s'" \
- "$_debug_file"
- fi
-fi
-unset _debug_file
+f_dprintf "%s: DEBUG_SELF_INITIALIZE=[%s]" \
+ dialog.subr "$DEBUG_SELF_INITIALIZE"
+case "$DEBUG_SELF_INITIALIZE" in
+""|0|[Nn][Oo]|[Oo][Ff][Ff]|[Ff][Aa][Ll][Ss][Ee]) : do nothing ;;
+*) f_debug_init
+esac
#
# Log our operating environment for debugging purposes
Modified: head/usr.sbin/bsdconfig/share/mustberoot.subr
==============================================================================
--- head/usr.sbin/bsdconfig/share/mustberoot.subr Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/share/mustberoot.subr Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
if [ ! "$_MUSTBEROOT_SUBR" ]; then _MUSTBEROOT_SUBR=1
#
-# Copyright (c) 2006-2012 Devin Teske
+# Copyright (c) 2006-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -250,6 +250,7 @@ f_become_root_via_sudo()
fi
# Re-execute ourselves with sudo(8)
+ f_dprintf "%s: Becoming root via sudo(8)..." mustberoot.subr
if [ $ARGC -gt 0 ]; then
exec sudo "$0" $ARGV
else
Modified: head/usr.sbin/bsdconfig/startup/USAGE
==============================================================================
--- head/usr.sbin/bsdconfig/startup/USAGE Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/startup/USAGE Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,4 +1,4 @@
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,11 @@
Usage: bsdconfig @PROGRAM_NAME@ [OPTIONS]
OPTIONS:
- -h Print usage statement and exit.
+ -d Provide lots of debugging info on standard-out when running.
+ -D file Send debugging info to file. If file begins with a plus-sign
+ debug info is sent to both standard-out and file (minus the
+ leading plus).
+ -h Print this usage statement and exit.
-S Secure X11 mode (implies `-X'). As root, always prompt-for
and validate sudo(8) username/password before starting.
-X Use Xdialog(1) in place of dialog(1).
Modified: head/usr.sbin/bsdconfig/startup/misc
==============================================================================
--- head/usr.sbin/bsdconfig/startup/misc Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/startup/misc Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -276,7 +276,7 @@ dialog_input_value()
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/startup/rcadd Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -97,7 +97,7 @@ dialog_menu_main()
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/startup/rcconf Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -196,7 +196,7 @@ dialog_menu_main()
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/startup/rcdelete Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -269,7 +269,7 @@ dialog_menu_delete()
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/startup/rcedit Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -49,7 +49,7 @@ ipgm=$( f_index_menusel_keyword $BSDCFG_
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/startup/rcvar Mon Apr 22 05:02:34 2013 (r249746)
@@ -158,7 +158,7 @@ dialog_menu_main()
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX 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 Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/startup/startup Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2012 Devin Teske
+# Copyright (c) 2012-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -90,7 +90,7 @@ dialog_menu_main()
#
# Process command-line arguments
#
-while getopts hSX flag; do
+while getopts dD:hSX flag; do
case "$flag" in
h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";;
esac
Modified: head/usr.sbin/bsdconfig/timezone/USAGE
==============================================================================
--- head/usr.sbin/bsdconfig/timezone/USAGE Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/timezone/USAGE Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,4 +1,4 @@
-# Copyright (c) 2011-2012 Devin Teske
+# Copyright (c) 2011-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -26,11 +26,15 @@
Usage: bsdconfig @PROGRAM_NAME@ [-ehnrSsvX] [-C chroot_dir] [zinfo_file | zinfo_name]
OPTIONS:
- -h Print usage statement and exit.
+ -d Provide lots of debugging info on standard-out when running.
+ -D file Send debugging info to file. If file begins with a plus-sign
+ debug info is sent to both standard-out and file (minus the
+ leading plus).
-e Only return success on exit if user selects a timezone AND
the selected timezone was successfully installed. By default
(without this flag), success is always returned unless an
error has occurred.
+ -h Print this usage statement and exit.
-n Do not create or copy files.
-r Reinstall the zoneinfo file installed last time. The name is
obtained from /var/db/zoneinfo.
Modified: head/usr.sbin/bsdconfig/timezone/timezone
==============================================================================
--- head/usr.sbin/bsdconfig/timezone/timezone Mon Apr 22 01:26:13 2013 (r249745)
+++ head/usr.sbin/bsdconfig/timezone/timezone Mon Apr 22 05:02:34 2013 (r249746)
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2011-2012 Devin Teske
+# Copyright (c) 2011-2013 Devin Teske
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -115,7 +115,7 @@ dialog_menu_main()
#
# Process command-line arguments
#
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-all
mailing list