diff options
Diffstat (limited to 'usr.sbin/bsdconfig/packages')
| -rw-r--r-- | usr.sbin/bsdconfig/packages/INDEX | 55 | ||||
| -rw-r--r-- | usr.sbin/bsdconfig/packages/Makefile | 9 | ||||
| -rw-r--r-- | usr.sbin/bsdconfig/packages/Makefile.depend | 10 | ||||
| -rw-r--r-- | usr.sbin/bsdconfig/packages/Makefile.inc | 1 | ||||
| -rw-r--r-- | usr.sbin/bsdconfig/packages/USAGE | 36 | ||||
| -rw-r--r-- | usr.sbin/bsdconfig/packages/include/Makefile | 4 | ||||
| -rw-r--r-- | usr.sbin/bsdconfig/packages/include/Makefile.depend | 10 | ||||
| -rwxr-xr-x | usr.sbin/bsdconfig/packages/include/messages.subr | 26 | ||||
| -rwxr-xr-x | usr.sbin/bsdconfig/packages/packages | 81 |
9 files changed, 232 insertions, 0 deletions
diff --git a/usr.sbin/bsdconfig/packages/INDEX b/usr.sbin/bsdconfig/packages/INDEX new file mode 100644 index 000000000000..414eb0a57e82 --- /dev/null +++ b/usr.sbin/bsdconfig/packages/INDEX @@ -0,0 +1,55 @@ +# Copyright (c) 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. +# + +# +# Title that will be shown in the bsdconfig menu. +# +menu_title="Packages" + +# +# 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="Install pre-packaged software for FreeBSD" + +# +# 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="packages|packages" + +# +# ------------ 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="packages" diff --git a/usr.sbin/bsdconfig/packages/Makefile b/usr.sbin/bsdconfig/packages/Makefile new file mode 100644 index 000000000000..9081b784b912 --- /dev/null +++ b/usr.sbin/bsdconfig/packages/Makefile @@ -0,0 +1,9 @@ +SUBDIR= include + +FILESDIR= ${LIBEXECDIR}/bsdconfig/030.packages +FILES= INDEX USAGE + +SCRIPTSDIR= ${FILESDIR} +SCRIPTS= packages + +.include <bsd.prog.mk> diff --git a/usr.sbin/bsdconfig/packages/Makefile.depend b/usr.sbin/bsdconfig/packages/Makefile.depend new file mode 100644 index 000000000000..11aba52f82cf --- /dev/null +++ b/usr.sbin/bsdconfig/packages/Makefile.depend @@ -0,0 +1,10 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/bsdconfig/packages/Makefile.inc b/usr.sbin/bsdconfig/packages/Makefile.inc new file mode 100644 index 000000000000..01b5f23410c8 --- /dev/null +++ b/usr.sbin/bsdconfig/packages/Makefile.inc @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/usr.sbin/bsdconfig/packages/USAGE b/usr.sbin/bsdconfig/packages/USAGE new file mode 100644 index 000000000000..1a460cb97054 --- /dev/null +++ b/usr.sbin/bsdconfig/packages/USAGE @@ -0,0 +1,36 @@ +# Copyright (c) 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. +# + +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). diff --git a/usr.sbin/bsdconfig/packages/include/Makefile b/usr.sbin/bsdconfig/packages/include/Makefile new file mode 100644 index 000000000000..593c8eb80695 --- /dev/null +++ b/usr.sbin/bsdconfig/packages/include/Makefile @@ -0,0 +1,4 @@ +FILESDIR= ${LIBEXECDIR}/bsdconfig/030.packages/include +FILES= messages.subr + +.include <bsd.prog.mk> diff --git a/usr.sbin/bsdconfig/packages/include/Makefile.depend b/usr.sbin/bsdconfig/packages/include/Makefile.depend new file mode 100644 index 000000000000..11aba52f82cf --- /dev/null +++ b/usr.sbin/bsdconfig/packages/include/Makefile.depend @@ -0,0 +1,10 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/bsdconfig/packages/include/messages.subr b/usr.sbin/bsdconfig/packages/include/messages.subr new file mode 100755 index 000000000000..d9348d1a38e3 --- /dev/null +++ b/usr.sbin/bsdconfig/packages/include/messages.subr @@ -0,0 +1,26 @@ +# Copyright (c) 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. +# + +msg_package_selection="Package Selection" diff --git a/usr.sbin/bsdconfig/packages/packages b/usr.sbin/bsdconfig/packages/packages new file mode 100755 index 000000000000..9228ff9f59af --- /dev/null +++ b/usr.sbin/bsdconfig/packages/packages @@ -0,0 +1,81 @@ +#!/bin/sh +#- +# Copyright (c) 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. +# +# +############################################################ INCLUDES + +# Prevent device.subr (included indirectly via media/*.subr below) from auto +# scanning; we'll perform this manually using f_device_get_all() during init +# but only after we've successfully completed f_mustberoot_init(). +# +DEVICE_SELF_SCAN_ALL=NO + +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/media/common.subr +f_include $BSDCFG_SHARE/mustberoot.subr +f_include $BSDCFG_SHARE/packages/packages.subr + +BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="030.packages" +f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr + +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" + +############################################################ MAIN + +# Incorporate rc-file if it exists +[ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc" + +# +# Process command-line arguments +# +while getopts h$GETOPTS_STDARGS flag; do + case "$flag" in + h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm" ;; + esac +done +shift $(( $OPTIND - 1 )) + +# +# Initialize +# +f_dialog_title "$msg_package_selection" +f_dialog_backtitle "${ipgm:+bsdconfig }$pgm" +f_mustberoot_init +f_device_get_all + +# +# Display the package configuration menu and exit +# +trap 'f_media_close' EXIT +f_package_config + +################################################################################ +# END +################################################################################ |
