Author: dteske
Date: Sun Jul  7 19:13:34 2013
New Revision: 252995
URL: http://svnweb.freebsd.org/changeset/base/252995

Log:
  MFC bsdconfig(8) and sysrc(8) from HEAD. (shazam!)

Added:
  stable/9/usr.sbin/bsdconfig/
  stable/9/usr.sbin/bsdconfig/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/USAGE   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/bsdconfig   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/bsdconfig.8   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/console/
  stable/9/usr.sbin/bsdconfig/console/INDEX   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/console/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/console/USAGE   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/console/console   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/console/font   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/console/include/
  stable/9/usr.sbin/bsdconfig/console/include/Makefile   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/console/include/messages.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/console/keymap   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/console/repeat   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/console/saver   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/console/screenmap   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/console/ttys   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/diskmgmt/
  stable/9/usr.sbin/bsdconfig/diskmgmt/INDEX   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/diskmgmt/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/diskmgmt/USAGE   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/diskmgmt/diskmgmt   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/diskmgmt/include/
  stable/9/usr.sbin/bsdconfig/diskmgmt/include/Makefile   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/diskmgmt/include/messages.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/docsinstall/
  stable/9/usr.sbin/bsdconfig/docsinstall/INDEX   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/docsinstall/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/docsinstall/USAGE   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/docsinstall/docsinstall   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/docsinstall/include/
  stable/9/usr.sbin/bsdconfig/docsinstall/include/Makefile   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/docsinstall/include/messages.subr   (contents, 
props changed)
  stable/9/usr.sbin/bsdconfig/dot/
  stable/9/usr.sbin/bsdconfig/dot/INDEX   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/dot/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/dot/USAGE   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/dot/dot   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/dot/include/
  stable/9/usr.sbin/bsdconfig/dot/include/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/dot/include/messages.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/examples/
  stable/9/usr.sbin/bsdconfig/examples/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/examples/browse_packages.sh   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/examples/bsdconfigrc   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/fdisk/
  stable/9/usr.sbin/bsdconfig/include/
  stable/9/usr.sbin/bsdconfig/include/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/include/bsdconfig.hlp   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/include/media.hlp   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/include/messages.subr   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/include/network_device.hlp   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/include/options.hlp   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/include/tcp.hlp   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/include/usage.hlp   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/mouse/
  stable/9/usr.sbin/bsdconfig/mouse/INDEX   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/mouse/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/mouse/USAGE   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/mouse/disable   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/mouse/enable   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/mouse/flags   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/mouse/include/
  stable/9/usr.sbin/bsdconfig/mouse/include/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/mouse/include/messages.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/mouse/mouse   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/mouse/port   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/mouse/type   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/networking/
  stable/9/usr.sbin/bsdconfig/networking/INDEX   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/networking/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/networking/USAGE   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/networking/defaultrouter   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/networking/devices   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/networking/hostname   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/networking/include/
  stable/9/usr.sbin/bsdconfig/networking/include/Makefile   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/networking/include/messages.subr   (contents, 
props changed)
  stable/9/usr.sbin/bsdconfig/networking/nameservers   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/networking/networking   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/networking/share/
  stable/9/usr.sbin/bsdconfig/networking/share/Makefile   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/networking/share/common.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/networking/share/device.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/networking/share/hostname.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/networking/share/ipaddr.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/networking/share/media.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/networking/share/netmask.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/networking/share/resolv.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/networking/share/routing.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/networking/share/services.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/packages/
  stable/9/usr.sbin/bsdconfig/packages/INDEX   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/packages/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/packages/USAGE   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/packages/include/
  stable/9/usr.sbin/bsdconfig/packages/include/Makefile   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/packages/include/messages.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/packages/packages   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/password/
  stable/9/usr.sbin/bsdconfig/password/INDEX   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/password/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/password/USAGE   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/password/include/
  stable/9/usr.sbin/bsdconfig/password/include/Makefile   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/password/include/messages.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/password/password   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/password/share/
  stable/9/usr.sbin/bsdconfig/password/share/Makefile   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/password/share/password.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/security/
  stable/9/usr.sbin/bsdconfig/security/INDEX   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/security/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/security/USAGE   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/security/include/
  stable/9/usr.sbin/bsdconfig/security/include/Makefile   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/security/include/messages.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/security/include/securelevel.hlp   (contents, 
props changed)
  stable/9/usr.sbin/bsdconfig/security/kern_securelevel   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/security/security   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/
  stable/9/usr.sbin/bsdconfig/share/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/common.subr   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/device.subr   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/dialog.subr   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/media/
  stable/9/usr.sbin/bsdconfig/share/media/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/media/any.subr   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/media/cdrom.subr   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/media/common.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/share/media/directory.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/share/media/dos.subr   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/media/floppy.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/share/media/ftp.subr   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/media/http.subr   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/media/httpproxy.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/share/media/network.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/share/media/nfs.subr   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/media/options.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/share/media/tcpip.subr   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/media/ufs.subr   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/media/usb.subr   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/mustberoot.subr   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/packages/
  stable/9/usr.sbin/bsdconfig/share/packages/Makefile   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/share/packages/categories.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/share/packages/index.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/share/packages/packages.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/share/script.subr   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/strings.subr   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/struct.subr   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/sysrc.subr   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/share/variable.subr   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/startup/
  stable/9/usr.sbin/bsdconfig/startup/INDEX   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/startup/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/startup/USAGE   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/startup/include/
  stable/9/usr.sbin/bsdconfig/startup/include/Makefile   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/startup/include/messages.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/startup/misc   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/startup/rcadd   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/startup/rcconf   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/startup/rcdelete   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/startup/rcedit   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/startup/rcvar   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/startup/share/
  stable/9/usr.sbin/bsdconfig/startup/share/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/startup/share/rcconf.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/startup/share/rcedit.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/startup/share/rcvar.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/startup/startup   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/timezone/
  stable/9/usr.sbin/bsdconfig/timezone/INDEX   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/timezone/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/timezone/USAGE   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/timezone/include/
  stable/9/usr.sbin/bsdconfig/timezone/include/Makefile   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/timezone/include/messages.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/timezone/share/
  stable/9/usr.sbin/bsdconfig/timezone/share/Makefile   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/timezone/share/continents.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/timezone/share/countries.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/timezone/share/iso3166.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/timezone/share/menus.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/timezone/share/zones.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/timezone/timezone   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/ttys/
  stable/9/usr.sbin/bsdconfig/ttys/INDEX   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/ttys/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/ttys/USAGE   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/ttys/include/
  stable/9/usr.sbin/bsdconfig/ttys/include/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/ttys/include/messages.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/ttys/ttys   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/usermgmt/
  stable/9/usr.sbin/bsdconfig/usermgmt/INDEX   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/usermgmt/Makefile   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/usermgmt/USAGE   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/usermgmt/groupadd   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/usermgmt/groupdel   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/usermgmt/groupedit   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/usermgmt/groupinput   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/usermgmt/include/
  stable/9/usr.sbin/bsdconfig/usermgmt/include/Makefile   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/usermgmt/include/messages.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/usermgmt/include/usermgmt.hlp   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/usermgmt/share/
  stable/9/usr.sbin/bsdconfig/usermgmt/share/Makefile   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/usermgmt/share/group_input.subr   (contents, 
props changed)
  stable/9/usr.sbin/bsdconfig/usermgmt/share/user_input.subr   (contents, props 
changed)
  stable/9/usr.sbin/bsdconfig/usermgmt/useradd   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/usermgmt/userdel   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/usermgmt/useredit   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/usermgmt/userinput   (contents, props changed)
  stable/9/usr.sbin/bsdconfig/usermgmt/usermgmt   (contents, props changed)
  stable/9/usr.sbin/sysrc/
  stable/9/usr.sbin/sysrc/Makefile   (contents, props changed)
  stable/9/usr.sbin/sysrc/sysrc   (contents, props changed)
  stable/9/usr.sbin/sysrc/sysrc.8   (contents, props changed)
Modified:
  stable/9/usr.sbin/Makefile

Modified: stable/9/usr.sbin/Makefile
==============================================================================
--- stable/9/usr.sbin/Makefile  Sun Jul  7 19:07:00 2013        (r252994)
+++ stable/9/usr.sbin/Makefile  Sun Jul  7 19:13:34 2013        (r252995)
@@ -7,6 +7,7 @@ SUBDIR= adduser \
        arp \
        bootparamd \
        burncd \
+       bsdconfig \
        bsdinstall \
        cdcontrol \
        chkgrp \
@@ -80,6 +81,7 @@ SUBDIR=       adduser \
        snapinfo \
        spray \
        syslogd \
+       sysrc \
        tcpdchk \
        tcpdmatch \
        tcpdrop \

Added: stable/9/usr.sbin/bsdconfig/Makefile
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/9/usr.sbin/bsdconfig/Makefile        Sun Jul  7 19:13:34 2013        
(r252995)
@@ -0,0 +1,32 @@
+# $FreeBSD$
+
+SUBDIR=        console \
+       diskmgmt \
+       docsinstall \
+       dot \
+       examples \
+       include \
+       mouse \
+       networking \
+       packages \
+       password \
+       security \
+       share \
+       startup \
+       timezone \
+       ttys \
+       usermgmt
+
+FILESDIR=      ${LIBEXECDIR}/bsdconfig
+FILES=         USAGE
+
+SCRIPTS= bsdconfig
+
+MAN= bsdconfig.8
+
+beforeinstall:
+       mkdir -p ${DESTDIR}${FILESDIR}
+       mkdir -p ${DESTDIR}${SCRIPTSDIR}
+       mkdir -p ${DESTDIR}${MANDIR}8
+
+.include <bsd.prog.mk>

Added: stable/9/usr.sbin/bsdconfig/USAGE
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/9/usr.sbin/bsdconfig/USAGE   Sun Jul  7 19:13:34 2013        
(r252995)
@@ -0,0 +1,47 @@
+# Copyright (c) 2012 Ron McDowell
+# Copyright (c) 2012-2013 Devin Teske
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+
+Usage:
+       @PROGRAM_NAME@ [-h]
+       @PROGRAM_NAME@ command [-h]
+       @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 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).
+
+COMMANDS:
+@COMMAND_LIST@

Added: stable/9/usr.sbin/bsdconfig/bsdconfig
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/9/usr.sbin/bsdconfig/bsdconfig       Sun Jul  7 19:13:34 2013        
(r252995)
@@ -0,0 +1,429 @@
+#!/bin/sh
+#-
+# Copyright (c) 2012 Ron McDowell
+# Copyright (c) 2012-2013 Devin Teske
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+############################################################ INCLUDES
+
+# When common.subr is included, it automatically scans "$@" for `-d' and/or
+# `-D file' arguments to conditionally enable debugging. Similarly, when
+# dialog.subr is included, it automatically scans "$@" for `-X' and/or `-S'.
+# To prevent this scanning from becoming confused by extra options, define
+# any/all extra arguments to use in the optstring to getopts when scanning
+# for dedicated options such as those described.
+#
+# NOTE: This needs to be declared before including `common.subr'.
+# NOTE: You really only need to list flags that require an argument as unknown
+#       flags are silently accepted unless they take an argument (in which case
+#       the following argument will terminate option processing unless it looks
+#       like a flag).
+#
+GETOPTS_EXTRA="f:"
+
+BSDCFG_SHARE="/usr/share/bsdconfig"
+. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
+f_include $BSDCFG_SHARE/dialog.subr
+f_include $BSDCFG_SHARE/mustberoot.subr
+f_include $BSDCFG_SHARE/strings.subr
+
+BSDCFG_LIBE="/usr/libexec/bsdconfig"
+f_include_lang $BSDCFG_LIBE/include/messages.subr
+
+BSDCONFIG_HELPFILE=$BSDCFG_LIBE/include/bsdconfig.hlp
+USAGE_HELPFILE=$BSDCFG_LIBE/include/usage.hlp
+
+############################################################ CONFIGURATION
+
+#
+# Alternate `local' libexec directory for add-on modules (e.g., from ports)
+#
+BSDCFG_LOCAL_LIBE="/usr/local/libexec/bsdconfig"
+
+############################################################ FUNCTIONS
+
+# usage
+#
+# display usage and exit
+#
+usage()
+{
+       local index="INDEX"
+       local cmd_list # Calculated below
+
+       cd $BSDCFG_LIBE
+               # No need to preserve CWD (headed toward exit)
+
+       # Test for language-specific indices
+       f_quietly ls */"$index.${LANG:-$LC_ALL}" &&
+               index="$index.${LANG:-$LC_ALL}"
+
+       cmd_list=$(
+               awk '/^menu_selection="/ {
+                       sub(/\|.*/, "")
+                       sub(/^menu_selection="/, "")
+                       print
+               }' */$index | sort
+       )
+
+       local alt_cmd_list # Calculated below (if $BSDCFG_LOCAL_LIBE exists)
+       if f_quietly cd $BSDCFG_LOCAL_LIBE; then
+               # No need to preserve CWD (headed toward exit)
+
+               # Test for language-specific indices
+               f_quietly ls */"$index.${LANG:-$LC_ALL}" &&
+                       index="$index.${LANG:-$LC_ALL}"
+
+               alt_cmd_list=$(
+                       awk '/^menu_selection="/ {
+                               sub(/\|.*/, "")
+                               sub(/^menu_selection="/, "")
+                               print
+                       }' */$index 2> /dev/null | sort
+               )
+
+               # Conflate lists, removing duplicates
+               cmd_list=$( printf "%s\n%s\n" \
+                                  "$cmd_list" "$alt_cmd_list" | sort -u )
+       fi
+
+       #
+       # Determine the longest command-length (in characters)
+       #
+       local longest_cmd
+       longest_cmd=$( echo "$cmd_list" | f_longest_line_length )
+       f_dprintf "longest_cmd=[%s]" "$longest_cmd"
+
+       #
+       # Determine the maximum width of terminal/console
+       #
+       local max_size="$( stty size 2> /dev/null )"
+       : ${max_size:="24 80"}
+       local max_width="${max_size#*[$IFS]}"
+       f_dprintf "max_width=[%s]" "$max_width"
+
+       #
+       # Using the longest command-length as the width of a single column,
+       # determine if we can use more than one column to display commands.
+       #
+       local x=$longest_cmd ncols=1
+       x=$(( $x + 8 )) # Accomodate leading tab character
+       x=$(( $x + 3 + $longest_cmd )) # Preload end of next column
+       while [ $x -lt $max_width ]; do
+               ncols=$(( $ncols + 1 ))
+               x=$(( $x + 3 + $longest_cmd ))
+       done
+       f_dprintf "ncols=[%u] x=[%u]" $ncols $x
+
+       #
+       # Re-format the command-list into multiple columns
+       #
+       cmd_list=$( eval "$( echo "$cmd_list" |
+               awk -v ncols=$ncols -v size=$longest_cmd '
+               BEGIN {
+                       n = 0
+                       row_item[1] = ""
+               }
+               function print_row()
+               {
+                       fmt = "printf \"\\t%-" size "s"
+                       for (i = 1; i < cur_col; i++)
+                               fmt = fmt "   %-" size "s"
+                       fmt = fmt "\\n\""
+                       printf "%s", fmt
+                       for (i = 1; i <= cur_col; i++)
+                               printf " \"%s\"", row_item[i]
+                       print ""
+               }
+               {
+                       n++
+                       cur_col = (( n - 1 ) % ncols ) + 1
+                       printf "f_dprintf \"row_item[%u]=[%%s]\" \"%s\"\n",
+                              cur_col, $0
+                       row_item[cur_col] = $0
+                       if ( cur_col == ncols ) print_row()
+               }
+               END {
+                       if ( cur_col < ncols ) print_row()
+               }' )"
+       )
+
+       f_usage $BSDCFG_LIBE/USAGE \
+               "PROGRAM_NAME" "$pgm" \
+               "COMMAND_LIST" "$cmd_list"
+
+       # Never reached
+}
+
+# dialog_menu_main
+#
+# Display the dialog(1)-based application main menu.
+#
+dialog_menu_main()
+{
+       local title="$DIALOG_TITLE"
+       local btitle="$DIALOG_BACKTITLE"
+       local prompt="$msg_menu_text"
+       local menu_list="
+               'X' '$msg_exit'  '$msg_exit_bsdconfig'
+               '1' '$msg_usage' '$msg_quick_start_how_to_use_this_menu_system'
+       " # END-QUOTE
+       local defaultitem= # Calculated below
+       local hline=
+
+       #
+       # Pick up the base modules (directories named `[0-9][0-9][0-9].*')
+       #
+       local menuitem menu_title menu_help menu_selection index=2
+       for menuitem in $( cd $BSDCFG_LIBE && ls -d [0-9][0-9][0-9].* ); do
+               [ -f "$BSDCFG_LIBE/$menuitem/INDEX" ] || continue
+               [ $index -lt ${#DIALOG_MENU_TAGS} ] || break
+
+               menu_program= menu_title= menu_help=
+               f_include_lang $BSDCFG_LIBE/$menuitem/INDEX
+               [ "$menu_program" ] || continue
+
+               case "$menu_program" in
+               /*) : already fully qualified ;;
+                *) menu_program="$menuitem/$menu_program"
+               esac
+
+               tag=$( f_substr "$DIALOG_MENU_TAGS" $index 1 )
+               setvar "menu_program$tag" "$menu_program"
+
+               f_shell_escape "$menu_title" menu_title
+               f_shell_escape "$menu_help" menu_help
+               menu_list="$menu_list '$tag' '$menu_title' '$menu_help'"
+
+               index=$(( $index + 1 ))
+       done
+
+       #
+       # Process the `local' libexec sources.
+       #
+       # Whereas modules in $BSDCFG_LIBE must be named [0-9][0-9][0-9].*
+       # modules in $BSDCFG_LOCAL_LIBE should NOT be named this way (making it
+       # more practical for port-maintainers).
+       #
+       # This also has the fortunate side-effect of making the de-duplication
+       # effort rather simple (because so-called `base' modules must be named
+       # differently than add-on modules).
+       #
+       local separator_added=
+       for menuitem in $( cd "$BSDCFG_LOCAL_LIBE" 2> /dev/null && ls -d * )
+       do
+               # Skip the module if it looks like a `base' module
+               case "$menuitem" in [0-9][0-9][0-9].*) continue;; esac
+
+               [ -f "$BSDCFG_LOCAL_LIBE/$menuitem/INDEX" ] || continue
+               [ $index -lt ${#DIALOG_MENU_TAGS} ] || break
+
+               menu_program= menu_title= menu_help=
+               f_include_lang $BSDCFG_LOCAL_LIBE/$menuitem/INDEX || continue
+               [ "$menu_program" ] || continue
+
+               if [ ! "$separator_added" ]; then
+                       menu_list="$menu_list '-' '-' ''"
+                       separator_added=1
+               fi
+
+               case "$menu_program" in
+               /*) : already fully qualified ;;
+                *) menu_program="$BSDCFG_LOCAL_LIBE/$menuitem/$menu_program"
+               esac
+
+               tag=$( f_substr "$DIALOG_MENU_TAGS" $index 1 )
+               setvar "menu_program$tag" "$menu_program"
+
+               f_shell_escape "$menu_title" menu_title
+               f_shell_escape "$menu_help" menu_help
+               menu_list="$menu_list '$tag' '$menu_title' '$menu_help'"
+
+               index=$(( $index + 1 ))
+       done
+
+       local height width rows
+       eval f_dialog_menu_with_help_size height width rows \
+                                         \"\$title\"  \
+                                         \"\$btitle\" \
+                                         \"\$prompt\" \
+                                         \"\$hline\"  \
+                                         $menu_list
+
+       # Obtain default-item from previously stored selection
+       f_dialog_default_fetch defaultitem
+
+       local menu_choice
+       menu_choice=$( eval $DIALOG \
+               --clear                                 \
+               --title \"\$title\"                     \
+               --backtitle \"\$btitle\"                \
+               --hline \"\$hline\"                     \
+               --item-help                             \
+               --ok-label \"\$msg_ok\"                 \
+               --cancel-label \"\$msg_exit_bsdconfig\" \
+               --help-button                           \
+               --help-label \"\$msg_help\"             \
+               ${USE_XDIALOG:+--help \"\"}             \
+               --default-item \"\$defaultitem\"        \
+               --menu \"\$prompt\"                     \
+               $height $width $rows                    \
+               $menu_list                              \
+               2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
+       )
+       local retval=$?
+       f_dialog_data_sanitize menu_choice
+       f_dialog_menutag_store "$menu_choice"
+
+       # Only update default-item on success
+       [ $retval -eq 0 ] && f_dialog_default_store "$menu_choice"
+
+       return $retval
+}
+
+############################################################ MAIN
+
+#
+# If $0 is not "bsdconfig", interpret it either as a keyword to a menuitem or
+# as a valid resword (see script.subr for additional details about reswords).
+#
+if [ "$pgm" != "bsdconfig" ]; then
+       if indexfile=$( f_index_file "$pgm" ) &&
+          cmd=$( f_index_menusel_command "$indexfile" "$pgm" )
+       then
+               f_dprintf "pgm=[%s] indexfile=[%s] cmd=[%s]" \
+                         "$pgm" "$indexfile" "$cmd"
+               exec "$cmd" "$@" || exit 1
+       else
+               f_include $BSDCFG_SHARE/script.subr
+               for resword in $RESWORDS; do
+                       [ "$pgm" = "$resword" ] || continue
+                       # Found a match
+                       f_dprintf "pgm=[%s] A valid resWord!" "$pgm"
+                       f_dispatch $resword
+                       exit $?
+               done
+       fi
+fi
+
+#
+# Process command-line arguments
+#
+scripts_loaded=0
+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"
+          scripts_loaded=$(( $scripts_loaded + 1 )) ;;
+       h|\?) usage ;;
+       esac
+done
+shift $(( $OPTIND -1 ))
+
+# If we've loaded any scripts, do not continue any further
+[ $scripts_loaded -gt 0 ] && exit
+
+#
+# Initialize
+#
+f_dialog_title "$msg_main_menu"
+
+[ "$SECURE" ] && f_mustberoot_init
+
+# Incorporate rc-file if it exists
+[ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc"
+
+#
+# If a non-option argument was passed, process it as a menuitem selection...
+#
+if [ "$1" ]; then
+       #
+       # ...unless it's a long-option for usage.
+       #
+       case "$1" in -help|--help|-\?)
+               usage
+               # Not reached
+       esac
+
+       #
+       # Find the INDEX (possibly i18n) claiming this keyword and get the
+       # command to execute from the menu_selection line.
+       #
+       if ! { indexfile=$( f_index_file "$1" ) &&
+              cmd=$( f_index_menusel_command "$indexfile" "$1" )
+       }; then
+               # no matches, display usage (which shows valid keywords)
+               f_err "%s: %s: $msg_not_found\n" "$pgm" "$1"
+               usage
+               # Not reached
+       fi
+
+       shift
+       exec $cmd ${USE_XDIALOG:+-X} "$@" || exit 1
+       # Not reached
+fi
+
+#
+# Launch application main menu
+#
+while :; do
+       dialog_menu_main
+       retval=$?
+       f_dialog_menutag_fetch mtag
+       f_dprintf "retval=%u mtag=[%s]" $retval "$mtag"
+
+       if [ $retval -eq 2 ]; then
+               # The Help button was pressed
+               f_show_help "$BSDCONFIG_HELPFILE"
+               continue
+       elif [ $retval -ne 0 ]; then
+               f_die
+       fi
+
+       case "$mtag" in
+       X) break ;;
+       1) # Usage
+          f_show_help "$USAGE_HELPFILE"
+          continue
+       esac
+
+       # Anything else is a dynamically loaded menuitem
+
+       f_getvar menu_program$mtag menu_program
+       case "$menu_program" in
+       /*) cmd="$menu_program" ;;
+        *) cmd="$BSDCFG_LIBE/$menu_program"
+       esac
+       f_dprintf "cmd=[%s]" "$cmd"
+       $cmd ${USE_XDIALOG:+-X}
+done
+
+exit $SUCCESS
+
+################################################################################
+# END
+################################################################################

Added: stable/9/usr.sbin/bsdconfig/bsdconfig.8
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/9/usr.sbin/bsdconfig/bsdconfig.8     Sun Jul  7 19:13:34 2013        
(r252995)
@@ -0,0 +1,243 @@
+.\" Copyright (c) 2012 Ron McDowell
+.\" Copyright (c) 2012-2013 Devin Teske
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd Jun 5, 2013
+.Dt BSDCONFIG 8
+.Os
+.Sh NAME
+.Nm bsdconfig
+.Nd system configuration utility
+.Sh SYNOPSIS
+.Nm
+.Op Fl h
+.Nm
+.Ar command
+.Op Fl h
+.Nm
+.Op OPTIONS
+.Op command Op OPTIONS
+.Sh DESCRIPTION
+.Nm
+is used to set up many system configuration settings, both for new systems, as
+well as changing configuration settings of existing systems.
+.Pp
+.Nm
+optionally takes a command as an argument.
+If invoked with no arguments, it will bring up an interactive menu listing the
+available modules.
+.Pp
+The following options are available:
+.Bl -tag -width indent+
+.It Fl d
+Provide lots of debugging info on standard-out when running.
+.It Fl D Ar 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).
+.It Fl f Ar file
+Load
+.Ar file
+as script and then exit.
+If multiple occurrences, program will only exit after last occurrence.
+If
+.Ar file
+is a single dash
+.Pq Sq Fl ,
+.Nm
+reads from standard input.
+.It Fl h
+Print usage statement and exit.
+.It Fl S
+Secure X11 mode
+.Pq implies Fl X .
+As root, always prompt-for and validate
+.Xr sudo 8
+username/password before starting.
+.It Fl X
+Use
+.Xr Xdialog 1
+in place of
+.Xr dialog 1 .
+.El
+.Sh COMMANDS
+The following commands
+.Pq sorted alphabetically
+are currently included in the base
+.Nm
+program, with more to be added soon.
+Other commands can be added, as detailed below in the
+.Cm ADDING COMMANDS
+section, and once added, will appear in the master menu as well as in the
+.Cm -h
+listing.
+.Bl -tag -width ".Cm syscons_screenmap"
+.It Cm console
+Utilities to customize the behavior of the system console.
+.It Cm defaultrouter
+Shortcut to the Default Router/Gateway menu under networking.
+.It Cm diskmgmt
+Manage disk partitions and/or labels.
+Executes
+.Xr sade 8 .
+.It Cm docsinstall
+Executes the
+.Cm bsdinstall docsinstall
+sub-utility to allow installation/re-installation of the FreeBSD Documentation
+set(s).
+.It Cm dot
+Generate a graphviz
+.Xr dot 1
+language file
+.Pq printed on stdout
+visualizing the
+.Nm
+menu, include, and shortcut structure relationships.
+See
+.Dq bsdconfig dot -h
+for more details.
+.It Cm groupadd
+Shortcut to the Add Groups menu under groupmgmt.
+.It Cm groupdel
+Shortcut to the Delete Groups menu under groupmgmt.
+.It Cm groupedit
+Shortcut to the Edit/View Groups menu under groupmgmt.
+.It Cm groupmgmt
+Utilities to Add/Change/View/Delete Group Accounts.
+.It Cm hostname
+Shortcut to the Hostname/Domain menu under networking.
+.It Cm kern_securelevel
+Shortcut to the kern.securelevel menu under security.
+.It Cm mouse
+Utilities for configuring, exploring, and enabling console mouse support.
+.It Cm mouse_disable
+Shortcut to the Disable menu under mouse.
+.It Cm mouse_enable
+Shortcut to the Enable menu under mouse.
+.It Cm mouse_flags
+Shortcut to the Flags menu under mouse.
+.It Cm mouse_port
+Shortcut to the Port menu under mouse.
+.It Cm mouse_type
+Shortcut to the Type menu under mouse.
+.It Cm nameservers
+Shortcut to the DNS Nameservers menu under networking.
+.It Cm netdev
+Shortcut to the Network Interfaces menu under networking.
+.It Cm networking
+Utilities to set/change Hostname/Domain, Network Interfaces, Default
+Router/Gateway, and DNS Nameservers.
+.It Cm packages
+Browse, install, uninstall, or re-install packaged software.
+.It Cm password
+Set the system administrator
+.Pq root
+password.
+.It Cm security
+Configure various system security settings.
+.It Cm startup
+Configure various aspects of system startup.
+.It Cm startup_misc
+Shortcut to the Miscellaneous Startup Services menu under startup.
+.It Cm startup_rcadd
+Shortcut to the Add New menu under the View/Edit Startup Configuration menu
+(startup_rcconf) of startup.
+.It Cm startup_rcconf
+Shortcut to the View/Edit Startup Configuration menu under startup.
+.It Cm startup_rcdelete
+Shortcut to the Delete menu under the View/Edit Startup Configuration menu
+(startup_rcconf) of startup.
+.It Cm startup_rcvar
+Shortcut to the Toggle Startup Services menu under startup.
+.It Cm syscons_font
+Shortcut to the Font menu under console.
+.It Cm syscons_keymap
+Shortcut to the Keymap menu under console.
+.It Cm syscons_repeat
+Shortcut to the Repeat menu under console.
+.It Cm syscons_saver
+Shortcut to the Saver menu under console.
+.It Cm syscons_screenmap
+Shortcut to the Screenmap menu under console.
+.It Cm syscons_ttys
+Shortcut to the Ttys menu under console.
+.It Cm timezone
+Set the regional timezone of the local machine.
+.It Cm ttys
+Edit the
+.Xr ttys 5
+database with your favorite editor.
+.It Cm useradd
+Shortcut to the Add Users menu under usermgmt.
+.It Cm userdel
+Shortcut to the Delete Users menu under usermgmt.
+.It Cm useredit
+Shortcut to the Edit/View Users menu under usermgmt.
+.It Cm usermgmt
+Utilities to Add/Edit/View/Delete User Accounts.
+.El
+.Sh INTERNATIONALIZATION
+i18n features are built into
+.Nm
+and language-specific translation files will be added as they become available.
+In the absence of language-specific translation files, the default
+.Pq en_US.ISO8859-1
+files will be used.
+.Sh ADDING COMMANDS
+To be documented later.
+Document menu_selection="command|*" syntax of INDEX files.
+.Sh ENVIRONMENT VARIABLES
+The following environment variables affect the execution of
+.Nm :
+.Bl -tag -width ".Ev LC_ALL"
+.It Ev LANG
+If LANG is set, messages and index information will be read from files named
+messages.$LANG and INDEX.$LANG and fall back to files named messages and INDEX
+if messages.$LANG and INDEX.$LANG do not exist.
+LANG takes precedence over LC_ALL.
+.It Ev LC_ALL
+If LC_ALL is set, messages and index information will be read from files named
+messages.$LC_ALL and INDEX.$LC_ALL and fall back to files named messages and
+INDEX if messages.$LC_ALL and INDEX.$LC_ALL do not exist.
+.El
+.Sh FILES
+/usr/share/examples/bsdconfig/bsdconfigrc can be copied to $HOME/.bsdconfigrc
+and customized as needed.
+.Sh EXIT STATUS
+.Ex -std
+.Sh SEE ALSO
+.Xr bsdinstall 8
+.Sh HISTORY
+.Nm
+first appeared in
+.Fx 9.2 .
+.Sh AUTHORS
+.An Ron McDowell
+.An Devin Teske Aq dte...@freebsd.org
+.Sh BUGS
+The docsinstall and diskmgmt modules call bsdinstall.
+Bugs found in these modules should be considered those of bsdinstall, not
+.Nm .

Added: stable/9/usr.sbin/bsdconfig/console/INDEX
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/9/usr.sbin/bsdconfig/console/INDEX   Sun Jul  7 19:13:34 2013        
(r252995)
@@ -0,0 +1,63 @@
+# Copyright (c) 2012 Ron McDowell
+# Copyright (c) 2012 Devin Teske
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+
+#
+# Title that will be shown in the bsdconfig menu.
+#
+menu_title="Console"
+
+#
+# A short descriptive line shown at the bottom of the bsdconfig menu. keep it
+# short because any line longer than the terminal width will be truncated.
+#
+menu_help="Customize system console behavior"
+
+#
+# Two-part variable that defines an action to take when `keyword' is passed on
+# a bsdconfig command line. Variable takes the form "keyword|command" and
+# multiple occurrences of the variable (with different `keyword's, or different
+# `keyword's AND `command's) are allowed.  If `command' begins with a '/' then
+# the full path to the program is needed. If `command' begins with anything
+# else it is a path relative to the directory this INDEX file is in. `keyword'
+# can be i18n'ed but `command' is the name of a script.
+#
+menu_selection="console|console"
+menu_selection="syscons_font|font"
+menu_selection="syscons_keymap|keymap"
+menu_selection="syscons_repeat|repeat"
+menu_selection="syscons_saver|saver"
+menu_selection="syscons_screenmap|screenmap"
+menu_selection="syscons_ttys|ttys"
+
+#
+# ------------ Items below this line do NOT need i18n translation ------------
+#
+# Name of the program to be run when this menu choice is selected. If it begins
+# with a '/' then the full path to the program is needed. If it begins with
+# anything else it is a path relative to the directory this INDEX file is in.
+#
+menu_program="console"

Added: stable/9/usr.sbin/bsdconfig/console/Makefile
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/9/usr.sbin/bsdconfig/console/Makefile        Sun Jul  7 19:13:34 
2013        (r252995)
@@ -0,0 +1,16 @@
+# $FreeBSD$
+
+NO_OBJ=
+
+SUBDIR= include
+
+FILESDIR=      ${LIBEXECDIR}/bsdconfig/080.console
+FILES=         INDEX USAGE
+
+SCRIPTSDIR=    ${FILESDIR}
+SCRIPTS=       console font keymap repeat saver screenmap ttys
+
+beforeinstall:
+       mkdir -p ${DESTDIR}${FILESDIR}
+
+.include <bsd.prog.mk>

Added: stable/9/usr.sbin/bsdconfig/console/USAGE
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/9/usr.sbin/bsdconfig/console/USAGE   Sun Jul  7 19:13:34 2013        
(r252995)
@@ -0,0 +1,37 @@
+# Copyright (c) 2012-2013 Devin Teske
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+
+Usage: bsdconfig @PROGRAM_NAME@ [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).
+       -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).

Added: stable/9/usr.sbin/bsdconfig/console/console
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/9/usr.sbin/bsdconfig/console/console Sun Jul  7 19:13:34 2013        
(r252995)
@@ -0,0 +1,146 @@
+#!/bin/sh
+#-
+# Copyright (c) 2012-2013 Devin Teske
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+############################################################ INCLUDES
+
+BSDCFG_SHARE="/usr/share/bsdconfig"
+. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
+f_include $BSDCFG_SHARE/dialog.subr
+f_include $BSDCFG_SHARE/mustberoot.subr
+
+BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console"
+f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
+
+ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
+[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"
+
+############################################################ FUNCTIONS
+
+# dialog_menu_main
+#
+# Display the dialog(1)-based application main menu.
+#
+dialog_menu_main()
+{
+       local prompt="$msg_console_menu_text"
+       local menu_list="
+               'X $msg_exit'      '$msg_exit_this_menu'
+               '2 $msg_font'      '$msg_choose_alternate_screen_font'
+               '3 $msg_keymap'    '$msg_choose_alternate_keyboard_map'
+               '4 $msg_repeat'    '$msg_set_repeat_rate'
+               '5 $msg_saver'     '$msg_configure_screen_saver'
+               '6 $msg_screenmap' '$msg_choose_alternate_screenmap'
+               '7 $msg_ttys'      '$msg_choose_console_terminal_type'
+       " # END-QUOTE
+       local defaultitem= # Calculated below
+       local hline="$hline_configure_system_console_settings"
+
+       local height width rows
+       eval f_dialog_menu_size height width rows \
+                               \"\$DIALOG_TITLE\"     \
+                               \"\$DIALOG_BACKTITLE\" \
+                               \"\$prompt\"           \
+                               \"\$hline\"            \
+                               $menu_list
+
+       # Obtain default-item from previously stored selection
+       f_dialog_default_fetch defaultitem
+
+       local menu_choice
+       menu_choice=$( eval $DIALOG \
+               --title \"\$DIALOG_TITLE\"         \
+               --backtitle \"\$DIALOG_BACKTITLE\" \
+               --hline \"\$hline\"                \
+               --ok-label \"\$msg_ok\"            \
+               --cancel-label \"\$msg_cancel\"    \
+               --default-item \"\$defaultitem\"   \
+               --menu \"\$prompt\"                \
+               $height $width $rows               \
+               $menu_list                         \
+               2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
+       )
+       local retval=$?
+       f_dialog_data_sanitize menu_choice
+       f_dialog_menutag_store "$menu_choice"
+       f_dialog_default_store "$menu_choice"

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to