Add all the help menus, and working menu items I currently have for sushi.
Note, these directories are missing Makefiles.. I know that.. and I'm working on it.
This commit is contained in:
parent
f7650338ca
commit
ceb08cea2c
|
@ -0,0 +1,35 @@
|
|||
Welcome to NetBSD sushi. This tool is designed to assist you in the
|
||||
everyday tasks of maintaining and administering your machine.
|
||||
|
||||
To use this tool, simply select the menu item that you wish to enter, with
|
||||
the arrow keys, and hit enter to select it.
|
||||
|
||||
You may use any of the function keys listed at the bottom of your screen
|
||||
to call certain functions within sushi:
|
||||
|
||||
F1: Call up help, if it exists, for the current menu or form.
|
||||
F2: Refresh the screen.
|
||||
F3: Cancel the current menu, and return to the previous one, or exit sushi.
|
||||
F8: Take a screen capture of the current screen and save it to "sushi.image".
|
||||
F9: Launch a shell to perform manual tasks.
|
||||
F10: Exit sushi immediately.
|
||||
ESC: Same as F3, Cancel.
|
||||
ENTER: Do.
|
||||
|
||||
Once you have selected a function to perform, sushi will do one of two
|
||||
things, it will either run the selected task immediately, or, in the case
|
||||
of a task which requires user input, present a form to the user. The user
|
||||
is expected to fill in the form, and hit enter. Required fields are
|
||||
marked with a "*" at the beginning of the line. Any other fields can be
|
||||
left unfilled, but should be examined to see if the defaults supplied are
|
||||
satisfactory. Once this is done, the user-supplied values will be passed
|
||||
to the controlling scripts, and the task will be attempted.
|
||||
|
||||
The output of the task will be displayed to the user in a scrolling
|
||||
window. Once complete, success or failure will be noted in the status bar
|
||||
at the top of the screen, and the user can scroll through the output, or
|
||||
simply hit ESC/ENTER to continue. If the task was unsuccessful, the user
|
||||
will be returned to the form, to attempt again if he/she should wish,
|
||||
otherwise the user is returned to the previous menu.
|
||||
|
||||
$NetBSD: help,v 1.1 2001/01/05 02:06:53 garbled Exp $
|
|
@ -0,0 +1,8 @@
|
|||
# $NetBSD: index,v 1.1 2001/01/05 02:06:53 garbled Exp $
|
||||
install install Software Installation and Maintenance
|
||||
system system System Maintenance
|
||||
users users Security & Users
|
||||
BLANK BLANK BLANK
|
||||
info info Using SMIT (information only)
|
||||
scripton info Turn scripting on
|
||||
scriptoff info Turn scripting off
|
|
@ -0,0 +1,2 @@
|
|||
# $NetBSD: index,v 1.1 2001/01/05 02:06:54 garbled Exp $
|
||||
programming NONE Programming menus in Sushi
|
|
@ -0,0 +1,26 @@
|
|||
The menus and forms in Sushi are very simple to create. At a minimum,
|
||||
they consist of a sub directory, an index file, and an action-file of some
|
||||
sort.
|
||||
|
||||
To create a new menu item, you would create a directory, edit the "index"
|
||||
file in the parent directory, and populate your new directory with the
|
||||
appropriate files.
|
||||
|
||||
The files are searched and executed in a specific order:
|
||||
|
||||
index A file containing definitions for submenus under this one.
|
||||
preform A form called before the regular form, to preload it
|
||||
with certain values.
|
||||
form The actual form definition, which presents the questionaire
|
||||
to the user.
|
||||
script An executable of some sort.
|
||||
exec A file containing the name of a program to run, with
|
||||
arguments.
|
||||
func Calls a function internal to Sushi.
|
||||
help Displays a helpfile, similar to this one.
|
||||
|
||||
It is an error to have an "endpoint" (a directory with no additional submenus)
|
||||
that contains no files, and upon encountering an empty enpoint, Sushi will
|
||||
exit with an error.
|
||||
|
||||
$NetBSD: help,v 1.1 2001/01/05 02:06:55 garbled Exp $
|
|
@ -0,0 +1,20 @@
|
|||
When an action file named "exec" is encountered by sushi, it will be read
|
||||
for a name of a program to execute. Only the first line of this file is
|
||||
read, and no continuations are allowed. Arguments may be passed to the
|
||||
program by placing them in the exec file. Additional arguments are passed
|
||||
to the program from the contents of the form. These arguments are passed
|
||||
in the order they appear in the form.
|
||||
|
||||
For example, an exec file might contain the following:
|
||||
|
||||
pkg_info -v
|
||||
|
||||
And it's preceeding form (if any) might contain one field, such as the
|
||||
name of a package to get detailed information on. So the actual command
|
||||
that might get run, could look something like this:
|
||||
|
||||
pkg_info -v fooshi-1.3
|
||||
|
||||
Note that all fields are passed as arguments, if you want them to be or not.
|
||||
|
||||
$NetBSD: help,v 1.1 2001/01/05 02:06:55 garbled Exp $
|
|
@ -0,0 +1,71 @@
|
|||
The forms in sushi are simple ascii databases of various fields and options
|
||||
that are shown to the user, to be later processed by a script or exec action
|
||||
item.
|
||||
|
||||
The form consists of a field type, followed by it's required arguments,
|
||||
and a description of the field. The different field types are listed below.
|
||||
|
||||
entry A simple entry field. The only argument is the length of
|
||||
the field.
|
||||
req-entry A required entry field. This is the same as the entry field
|
||||
except that the user must enter a value to proceed.
|
||||
escript An escript is an entry field, whose initial value is filled
|
||||
in by a script that is run during the form generation. The
|
||||
Arguments are: max field length, the name of the script to
|
||||
run, and any optional arguments the user wishes to pass to
|
||||
the script.
|
||||
req-escript A required escript field.
|
||||
nescript A no-entry escript. This is the same as an escript, except
|
||||
that the user is not allowed to modify the contents of
|
||||
the field.
|
||||
list A simple list of possible values. The arguments to this
|
||||
is a list of valid choices for the user.
|
||||
req-list A required list.
|
||||
multilist A multilist is the same as a list, except that the user may
|
||||
choose multiple items from the list, instead of only one.
|
||||
blank A blank item. This is useful for providing additional
|
||||
instructions for a particular field.
|
||||
func Calls a function internal to sushi. The function presents
|
||||
a list to the user. The arguments to func is the name of
|
||||
a function (which must be compiled into sushi) and an
|
||||
optional string argument to pass to the function.
|
||||
req-func A required function field.
|
||||
multifunc A function field where the user may make multiple selections.
|
||||
script The script field is a list field, where the list of items is
|
||||
generated by running a script. The script's only output
|
||||
must be a simple list of items, such as 'ls -1' might generate.
|
||||
The arguments are the name of the script to be called (which
|
||||
must reside in the endpoint directory) and any optional
|
||||
arguments to pass the script.
|
||||
req-script A required script field.
|
||||
multiscript A multiple selection list field.
|
||||
noedit An uneditable field. The argument is the value of the field.
|
||||
invis An invisible and uneditable field. The argument is the
|
||||
value of the field.
|
||||
integer An integer field. The arguments are the number of digits,
|
||||
the minimum number, and the maximum number allowed.
|
||||
req-integer A required integer field.
|
||||
|
||||
If a description consists of the keyword BLANK, no description will be
|
||||
displayed to the user.
|
||||
|
||||
An example of a simple form:
|
||||
|
||||
script:script1,audio Install which audio pkg?
|
||||
invis:audio BLANK
|
||||
list:yes,no Are you sure?
|
||||
|
||||
The field type is allways the first character on the line. It is followed
|
||||
directly by a semicolon, and then the arguments for the field, separated
|
||||
by commas. The description is separated from the field definition by one
|
||||
or more whitespaces, such as tab or space.
|
||||
|
||||
When the form is processed, its arguments are passed to a script or exec
|
||||
action-item for futher processing. In this example, a script run from
|
||||
the previous form, might recieve the following data:
|
||||
|
||||
$1 = "fooshi-1.3"
|
||||
$2 = "audio"
|
||||
$3 = "yes"
|
||||
|
||||
$NetBSD: help,v 1.1 2001/01/05 02:06:55 garbled Exp $
|
|
@ -0,0 +1,7 @@
|
|||
This is where you can find help on various parts of making your own menus
|
||||
and forms within Sushi. The application has been designed to make it very
|
||||
simple to make extensible and complex menus and functions. It is advised
|
||||
that if you wish to program your own menus, you read the documentation in
|
||||
the submenus, and look at some of the pre-existing menus.
|
||||
|
||||
$NetBSD: help,v 1.1 2001/01/05 02:06:54 garbled Exp $
|
|
@ -0,0 +1,9 @@
|
|||
The help API of sushi simply consists of a file of formatted text that will
|
||||
be presented to the user in a help box (much like the one you are reading now).
|
||||
The helpfile may be the only file in the directory, such as a tutotial, or
|
||||
if there are other items in the directory, it is accessed by the F1 key when
|
||||
the user requests help in a menu or form.
|
||||
|
||||
It is suggested that the file be formatted for an 80 column screen.
|
||||
|
||||
$NetBSD: help,v 1.1 2001/01/05 02:06:55 garbled Exp $
|
|
@ -0,0 +1,25 @@
|
|||
Sushi has support for multiple languages built in. Some of this support
|
||||
is via the cat* functions in libc, and other portions are via the various
|
||||
endpoint and action files.
|
||||
|
||||
A simple example using the german language is shown:
|
||||
|
||||
The user has a subdirectory, with a few endpoints in it, such as a form, a
|
||||
script, and a helpfile. Normally, these would be named "form" "script"
|
||||
and "help". if the user also wanted to support the german language, the
|
||||
files could be translated, and named: "form.de", "script.de" and
|
||||
"help.de".
|
||||
|
||||
It is important that when creating index files in an alternate language,
|
||||
that the names of the subdirectories not be translated, or the
|
||||
subdirectory will not be found.
|
||||
|
||||
In order to fully support an alternate language, the catalog files for
|
||||
that language must be built, and installed in the /usr/share/nls/<LANG>
|
||||
directory.
|
||||
|
||||
If the user has his language id set to a specific language, and the
|
||||
appropriate language file (such as help.de) does not exist, the standard
|
||||
english file will be loaded.
|
||||
|
||||
$NetBSD: help,v 1.1 2001/01/05 02:06:55 garbled Exp $
|
|
@ -0,0 +1,9 @@
|
|||
# $NetBSD: index,v 1.1 2001/01/05 02:06:54 garbled Exp $
|
||||
basics NONE The basics of making new Sushi Menus
|
||||
indexapi NONE The index file API
|
||||
formapi NONE The form creation API
|
||||
scriptapi NONE The script API
|
||||
execapi NONE The exec API
|
||||
helpapi NONE The help file API
|
||||
i18n NONE Alternate languages for Sushi
|
||||
searchpaths NONE How searchpaths work in Sushi
|
|
@ -0,0 +1,23 @@
|
|||
The index programing interface to Sushi consists of a flat ascii file, with
|
||||
three fields. The fields are whitespace separated.
|
||||
|
||||
The first field, is the name of a subdirectory, which must exist. No spaces
|
||||
can exist in this name.
|
||||
|
||||
The second field, is the quickpath. This is a unique keyword that can be used
|
||||
to automatically access this point within Sushi, when called on the command
|
||||
line as an argument to sushi.
|
||||
|
||||
The final field is the description. The description must be contained on one
|
||||
line, and can have embedded whitespace. The description is limited to about
|
||||
70 characters, due to screen width.
|
||||
|
||||
The special keywork "BLANK" can be used to insert a blank line in the menu.
|
||||
|
||||
A simple index file is shown below:
|
||||
|
||||
test test This is a test menu
|
||||
BLANK BLANK BLANK
|
||||
more more Another test menu item
|
||||
|
||||
$NetBSD: help,v 1.1 2001/01/05 02:06:56 garbled Exp $
|
|
@ -0,0 +1,41 @@
|
|||
The script endpoint can be executed either as a single endpoint (ie, when
|
||||
no forms are present) or is executed when a form is processed. The script
|
||||
is passed all of the form field contents as arguments. This includes any
|
||||
invisible, or uneditable fields. If a field is left blank the script will
|
||||
recieve a argument of '' or a null string. All variables are passed in
|
||||
the order they appear in the form.
|
||||
|
||||
A simple example is shown below:
|
||||
|
||||
form:
|
||||
|
||||
script:script1,audio Install which audio pkg?
|
||||
invis:audio BLANK
|
||||
|
||||
script:
|
||||
|
||||
#!/bin/sh
|
||||
if [ -z "$PKGSRCDIR" ]; then
|
||||
if [ -d "/usr/pkgsrc" ]; then
|
||||
PKGSRCDIR="/usr/pkgsrc"
|
||||
fi
|
||||
if [ -d "/usr/src/pkgsrc" ]; then
|
||||
PKGSRCDIR="/usr/src/pkgsrc"
|
||||
fi
|
||||
fi
|
||||
cd $PKGSRCDIR/$2/$1
|
||||
make clean && make install && make clean
|
||||
|
||||
Note that in the above example, the script field type, is different than
|
||||
the script that actually does the body of the work. The script field type
|
||||
must return a list of values to the user (see the form API for more
|
||||
information).
|
||||
|
||||
It is advised that your scripts have verbose output which will make it
|
||||
obvious to the user what work is being performed. The output of the
|
||||
script will be displayed to the user, as will the success or failure of
|
||||
the script, based on the exit code. A script which produces no output
|
||||
will be confusing to users.
|
||||
|
||||
|
||||
$NetBSD: help,v 1.1 2001/01/05 02:06:56 garbled Exp $
|
|
@ -0,0 +1,32 @@
|
|||
Sushi will scan a number of directories looking for menus and submenus, if
|
||||
they exist. The default directories that are currently searched for sushi
|
||||
menus are listed below:
|
||||
|
||||
/usr/share/sushi/
|
||||
/usr/pkg/share/sushi/
|
||||
/usr/X11R6/share/sushi/
|
||||
/etc/sushi/
|
||||
$HOME/sushi/
|
||||
|
||||
/usr/share/sushi is where system supplied menus will appear, such as those
|
||||
that ship with the NetBSD operating system.
|
||||
|
||||
/usr/pkg/share/sushi and /usr/X11R6/share/sushi are designed for use with the
|
||||
package system, and menus can be installed there as part of packages that wish
|
||||
to use them.
|
||||
|
||||
/etc/sushi is meant to be a user-configurable directory, where users can place
|
||||
menu items that will be seen system wide. This is the preferred place to
|
||||
put menus local to the machine, or that you have written yourself.
|
||||
|
||||
The menus are scanned in the above order, and will appear on the menu in
|
||||
that order. No differentiation will be made for menus found in the
|
||||
various directories. All menu directories will be combined into a single
|
||||
unified tree for the user. If a directory does not exist, it is not an
|
||||
error, and will be ignored.
|
||||
|
||||
The searchpath for sushi can be modified, by adding directories, one
|
||||
directory per line, to the file /etc/sushi.conf. This file overrides the
|
||||
built in defaults, which are used if it does not exist.
|
||||
|
||||
$NetBSD: help,v 1.1 2001/01/05 02:06:56 garbled Exp $
|
|
@ -0,0 +1,3 @@
|
|||
This is a help menu for the install menu.
|
||||
|
||||
$NetBSD: help,v 1.1 2001/01/05 02:06:56 garbled Exp $
|
|
@ -0,0 +1,5 @@
|
|||
# $NetBSD: index,v 1.1 2001/01/05 02:06:57 garbled Exp $
|
||||
installb install-binary Install New Binary Packages
|
||||
install install-source Install New Packages from source
|
||||
remove remove-pkg Remove Installed Packages
|
||||
list list-pkg List Installed packages
|
|
@ -0,0 +1,3 @@
|
|||
# $NetBSD: form,v 1.1 2001/01/05 02:06:57 garbled Exp $
|
||||
script:script1,audio Install which audio pkg?
|
||||
invis:audio BLANK
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: script,v 1.1 2001/01/05 02:06:57 garbled Exp $
|
||||
if [ -z "$PKGSRCDIR" ]; then
|
||||
if [ -d "/usr/pkgsrc" ]; then
|
||||
PKGSRCDIR="/usr/pkgsrc"
|
||||
fi
|
||||
if [ -d "/usr/src/pkgsrc" ]; then
|
||||
PKGSRCDIR="/usr/src/pkgsrc"
|
||||
fi
|
||||
fi
|
||||
cd $PKGSRCDIR/$2/$1
|
||||
make clean && make install && make clean
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/ksh
|
||||
# $NetBSD: script1,v 1.1 2001/01/05 02:06:57 garbled Exp $
|
||||
if [ -z "$PKGSRCDIR" ]; then
|
||||
if [ -d "/usr/pkgsrc" ]; then
|
||||
PKGSRCDIR="/usr/pkgsrc"
|
||||
fi
|
||||
if [ -d "/usr/src/pkgsrc" ]; then
|
||||
PKGSRCDIR="/usr/src/pkgsrc"
|
||||
fi
|
||||
fi
|
||||
cd $PKGSRCDIR/$1
|
||||
#for i in */Makefile
|
||||
#do
|
||||
# grep PKGNAME= $i >/dev/null
|
||||
# if [ $? -eq 0 ]; then
|
||||
# grep PKGNAME= $i | sed -e 's/.*PKGNAME= * *//'
|
||||
# else
|
||||
# grep DISTNAME= $i >/dev/null
|
||||
# if [ $? -eq 0 ]; then
|
||||
# grep DISTNAME= $i | sed -e 's/.*DISTNAME= * *//'
|
||||
# fi
|
||||
# fi
|
||||
#done
|
||||
ls -1d */ | grep -v pkg | sed -e 's@/@@'
|
|
@ -0,0 +1,3 @@
|
|||
# $NetBSD: form,v 1.1 2001/01/05 02:06:57 garbled Exp $
|
||||
func:ftp_pkglist,audio Install which audio pkg
|
||||
invis:audio BLANK
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh -x
|
||||
# $NetBSD: script,v 1.1 2001/01/05 02:06:57 garbled Exp $
|
||||
if [ -z "$PKG_PATH" ]; then
|
||||
PKG_PATH="ftp://ftp.netbsd.org/pub/NetBSD/packages"
|
||||
fi
|
||||
NBSDVERS=`uname -r | sed 's@\.\([0-9]*\)[\._].*@\.\1@'`
|
||||
pkg_add -v ${PKG_PATH}/${NBSDVERS}/`uname -m`/$2/${1}.tgz
|
|
@ -0,0 +1 @@
|
|||
pkg_info
|
|
@ -0,0 +1,4 @@
|
|||
# $NetBSD: form,v 1.1 2001/01/05 02:06:58 garbled Exp $
|
||||
script:script1,NULL Remove which pkg
|
||||
list:no,yes Recursively delete pkgs that need this pkg?
|
||||
list:no,yes Force deletion?
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: script,v 1.1 2001/01/05 02:06:58 garbled Exp $
|
||||
if [ "$2" = "yes" ]; then
|
||||
RECURSE="-r"
|
||||
fi
|
||||
if [ "$3" = "yes" ]; then
|
||||
FORCE="-f"
|
||||
fi
|
||||
pkg_delete -v $FORCE $RECURSE $1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Successfully removed pkg $1"
|
||||
fi
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: script1,v 1.1 2001/01/05 02:06:58 garbled Exp $
|
||||
pkg_info -e \* | sort
|
|
@ -0,0 +1 @@
|
|||
script_do,off
|
|
@ -0,0 +1 @@
|
|||
script_do,on
|
|
@ -0,0 +1,2 @@
|
|||
# $NetBSD: index,v 1.1 2001/01/05 02:06:59 garbled Exp $
|
||||
rcconf rcconf Edit startup configuration
|
|
@ -0,0 +1,108 @@
|
|||
# $NetBSD: form,v 1.1 2001/01/05 02:06:59 garbled Exp $
|
||||
script:script1,do_rcshutdown Run /etc/rc.shutdown?
|
||||
escript:15,script2,hostname Hostname, if blank use /etc/myname
|
||||
escript:15,script2,defaultroute Default Route, if blank use /etc/mygate
|
||||
escript:15,script2,domainname NIS Domain Name, if blank use /etc/defaultdomain
|
||||
escript:15,script2,critical_filesystems_beforenet Filesystems to mount before network config
|
||||
escript:15,script2,critical_filesystems Filesystems to mount early in boot process
|
||||
script:script1,no_swap Set to yes if you have no swap configured
|
||||
script:script1,lkm Run /etc/rc.lkm
|
||||
script:script1,savecore Run savecore at boot?
|
||||
escript:15,script2,savecore_flags Flags to pass to savecore
|
||||
script:script1,clear_tmp Clear /tmp on boot?
|
||||
script:script1,update_motd Update /etc/motd at boot?
|
||||
script:script1,dmesg Create /var/run/dmesg.boot at boot?
|
||||
escript:15,script2,dmesg_flags Flags to pass to dmesg
|
||||
script:script1,accounting Start accounting?
|
||||
escript:1,script2,securelevel If non-blank, set securelevel early in boot
|
||||
script:script1,ipfilter Start ipfiltering?
|
||||
script:script1,ipnat Start ipnat NAT daemon?
|
||||
script:script1,ipsec Start ipsec security daemon?
|
||||
script:script1,ipmon Write ipfilter messages to syslog?
|
||||
escript:15,script2,ipmon_flags Flags to pass to ipmon
|
||||
script:script1,auto_ifconfig Automatically configure all available interfaces?
|
||||
escript:15,script2,net_interfaces If above is NO, configure which interfaces?
|
||||
script:script1,flushroutes Flush routes in netstart?
|
||||
script:script1,dhclient Behave as a DHCP client?
|
||||
escript:15,script2,dhclient_flags Flags for DHCP, if blank, config all interfaces
|
||||
script:script1,ntpdate Run ntpdate at boot?
|
||||
escript:15,script2,ntpdate_flags Flags for ntpdate.
|
||||
escript:15,script2,ppp_peers /etc/ppp/peers to call
|
||||
list:host,autohost,router IPV6 mode
|
||||
script:script1,rtsol IPV6 autoconfig on non routers
|
||||
escript:15,script2,rtsol_flags Flags to pass to rtsol
|
||||
script:script1,inetd Run inetd?
|
||||
escript:15,script2,inetd_flags Flags for inetd
|
||||
script:script1,rpcbind Run rpcbind? (replaces portmap)
|
||||
escript:15,script2,rpcbind_flags Flags for rpcbind
|
||||
script:script1,syslogd Run syslogd?
|
||||
escript:15,script2,syslogd_flags Flags for syslogd
|
||||
script:script1,cron Run cron?
|
||||
script:script1,named Run named?
|
||||
escript:15,script2,named_flags Flags for named
|
||||
script:script1,timed Run timed?
|
||||
escript:15,script2,timed_flags Flags for timed
|
||||
script:script1,ntpd Run ntpd?
|
||||
escript:40,script2,ntpd_flags Flags for ntpd
|
||||
script:script1,sendmail Run sendmail?
|
||||
escript:15,script2,sendmail_flags Flags for sendmail
|
||||
script:script1,postfix Run postfix?
|
||||
script:script1,lpd Run lpd?
|
||||
escript:15,script2,lpd_flags Flags for lpd
|
||||
script:script1,sshd Run sshd?
|
||||
escript:15,script2,sshd_flags Flags for sshd
|
||||
script:script1,routed Run routed?
|
||||
escript:15,script2,routed_flags Flags for routed
|
||||
script:script1,gated Run gated?
|
||||
escript:15,script2,gated_flags Flags for gated
|
||||
script:script1,mrouted Run mrouted?
|
||||
escript:15,script2,mrouted_flags Flags for mrouted
|
||||
script:script1,route6d Run IPV6 routed?
|
||||
escript:15,script2,route6d_flags Flags for route6d
|
||||
script:script1,rtsold Run rtsold?
|
||||
escript:15,script2,rtsold_flags Flags for rtsold
|
||||
script:script1,rarpd Run rarpd?
|
||||
escript:15,script2,rarpd_flags Flags for rarpd
|
||||
script:script1,bootparamd Run bootparamd?
|
||||
escript:15,script2,bootparamd_flags Flags for bootparamd
|
||||
script:script1,dhcpd Run dhcpd?
|
||||
escript:15,script2,dhcpd_flags Flags for dhcpd
|
||||
script:script1,dhcrelay Run dhcrelay?
|
||||
escript:15,script2,dhcrelay_flags Flags for dhcrelay
|
||||
script:script1,rbootd Run rbootd?
|
||||
escript:15,script2,rbootd_flags Flags for rbootd
|
||||
script:script1,mopd Run mopd?
|
||||
escript:15,script2,mopd_flags Flags for mopd
|
||||
script:script1,rtadvd Run rtadvd?
|
||||
escript:15,script2,rtadvd_flags Flags for rtadvd
|
||||
script:script1,xfs Run X11 Font Server (xfs)?
|
||||
escript:15,script2,xfs_flags Flags for xfs
|
||||
script:script1,xdm Run X11 Display Manager (xdm)?
|
||||
escript:15,script2,xdm_flags Flags for xdm
|
||||
script:script1,ypbind Run ypbind (NIS)?
|
||||
escript:15,script2,ypbind_flags Flags for ypbind
|
||||
script:script1,ypserv Run ypserv (NIS)?
|
||||
escript:15,script2,ypserv_flags Flags for ypserv
|
||||
script:script1,yppasswdd Run yppasswdd (NIS)?
|
||||
escript:15,script2,yppasswdd_flags Flags for yppasswdd
|
||||
script:script1,nfs_client Run NFS client daemons?
|
||||
script:script1,nfs_server Run NFS server daemons?
|
||||
escript:15,script2,mountd_flags Flags for mountd
|
||||
escript:15,script2,nfsd_flags Flags for nfsd
|
||||
script:script1,lockd Run lockd?
|
||||
escript:15,script2,lockd_flags Flags for lockd
|
||||
script:script1,statd Run statd?
|
||||
escript:15,script2,statd_flags Flags for statd
|
||||
script:script1,amd Run automounter (amd)?
|
||||
escript:40,script2,amd_flags Flags for amd
|
||||
escript:15,script2,amd_dir Mount point for amd
|
||||
escript:15,script2,amd_master Location of amd master map file
|
||||
script:script1,kdc Run kerberos 5 KDC?
|
||||
escript:15,script2,kdc_flags Flags for kerberos 5
|
||||
script:script1,rwhod Run rwhod?
|
||||
script:script1,apmd Run apmd?
|
||||
escript:15,script2,apmd_flags Flags for apmd
|
||||
script:script1,screenblank Run screenblank (i386/sparc only)?
|
||||
escript:15,script2,screenblank_flags Flags for screenblank
|
||||
script:script1,wscons Configure wscons?
|
||||
escript:15,script2,wscons_flags Flags to pass to /etc/rc.wscons
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: script,v 1.1 2001/01/05 02:06:59 garbled Exp $
|
||||
. /etc/default/rc.conf
|
||||
CONFFILE="/etc/rc.conf"
|
||||
echo -n "#Generated by smit on " >$CONFFILE
|
||||
date >>$CONFFILE
|
||||
echo "if [ -r /etc/default/rc.conf ]; then" >>$CONFFILE
|
||||
echo " . /etc/default/rc.conf" >>$CONFFILE
|
||||
echo "fi" >>$CONFFILE
|
||||
echo "rc_configured=YES" >>$CONFFILE
|
||||
a=1
|
||||
IFS="
|
||||
"
|
||||
for i in `smitty/system/rcconf/script3`
|
||||
do
|
||||
ANS=$(echo `eval echo \\$${a}` | sed -e 's/ $//')
|
||||
if [ "$ANS" != "`eval echo \\$${i}`" ]; then
|
||||
if [ "$ANS" = "YES" -o "$ANS" = "NO" ]; then
|
||||
echo "$i=$ANS" >>$CONFFILE
|
||||
else
|
||||
echo "$i=\"$ANS\"" >>$CONFFILE
|
||||
fi
|
||||
fi
|
||||
a=`expr $a + 1`
|
||||
done
|
||||
echo "successfully wrote a new $CONFFILE"
|
||||
cat $CONFFILE
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: script1,v 1.1 2001/01/05 02:06:59 garbled Exp $
|
||||
. /etc/rc.conf
|
||||
CONF=`eval echo \\$${1}`
|
||||
echo $CONF
|
||||
if [ "$CONF" = "YES" ]; then
|
||||
echo "NO"
|
||||
else
|
||||
echo "YES"
|
||||
fi
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: script2,v 1.1 2001/01/05 02:06:59 garbled Exp $
|
||||
. /etc/rc.conf
|
||||
echo `eval echo \\$${1}`
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: script3,v 1.1 2001/01/05 02:06:59 garbled Exp $
|
||||
sh -x /etc/default/rc.conf 2>&1 | sed -e 's/^+ //' | \
|
||||
sed -e 's/\([EN][SO]\) /\1\
|
||||
/' | sed -e 's/=.*//'
|
||||
# the newline above is there for a reason
|
|
@ -0,0 +1,9 @@
|
|||
# $NetBSD: form,v 1.1 2001/01/05 02:07:00 garbled Exp $
|
||||
req-entry:8, Username
|
||||
script:script1 Primary group
|
||||
script:script3 Secondary group
|
||||
entry:30, User's real name
|
||||
entry:50, User's home directory
|
||||
integer:4,0,2000 Days before password expires
|
||||
script:script2 User's login shell
|
||||
integer:6,0,32767 User's UID.
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh -x
|
||||
# $NetBSD: script,v 1.1 2001/01/05 02:07:00 garbled Exp $
|
||||
CTIME=`date +%s`
|
||||
if [ ! -z $6 ]; then
|
||||
EXPIRE=`expr $6 \* 24 \* 60 \* 60 + $CTIME`
|
||||
EXPIRE=`echo "-e $EXPIRE"`
|
||||
fi
|
||||
if [ -z $5 ]; then
|
||||
HOME=`grep base_dir /etc/usermgmt.conf | awk '{print $2}'`
|
||||
HOME=`echo "${HOME}/${1}"`
|
||||
else
|
||||
HOME=$5
|
||||
fi
|
||||
if [ -z $8 ]; then
|
||||
UID=""
|
||||
else
|
||||
UID="-u $8"
|
||||
fi
|
||||
if [ $3 != "NONE" ]; then
|
||||
SG="-G $3"
|
||||
fi
|
||||
useradd $SG $UID -c "$4" -d $HOME $EXPIRE -g $2 -m -s $7 -v $1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "User $1 successfully created"
|
||||
fi
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: script1,v 1.1 2001/01/05 02:07:00 garbled Exp $
|
||||
cut -f 1 -d ':' /etc/group
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: script2,v 1.1 2001/01/05 02:07:00 garbled Exp $
|
||||
egrep -v '(^#|^$)' /etc/shells
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: script3,v 1.1 2001/01/05 02:07:00 garbled Exp $
|
||||
echo "NONE"
|
||||
cut -f 1 -d ':' /etc/group
|
|
@ -0,0 +1,4 @@
|
|||
# $NetBSD: form,v 1.1 2001/01/05 02:07:00 garbled Exp $
|
||||
noedit:@@@1@@@ User to be deleted:
|
||||
nescript:script2,@@@1@@@ User's home dir:
|
||||
list:no,yes Delete user's home directory?
|
|
@ -0,0 +1,2 @@
|
|||
# $NetBSD: preform,v 1.1 2001/01/05 02:07:00 garbled Exp $
|
||||
script:script1 User to delete?
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: script,v 1.1 2001/01/05 02:07:00 garbled Exp $
|
||||
if [ "$3" = "yes" ]; then
|
||||
userdel -v -r $1
|
||||
else
|
||||
userdel -v $1
|
||||
fi
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "User $1 deleted"
|
||||
fi
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: script1,v 1.1 2001/01/05 02:07:00 garbled Exp $
|
||||
cut -f 1 -d ':' /etc/passwd
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: script2,v 1.1 2001/01/05 02:07:00 garbled Exp $
|
||||
grep ^$1 /etc/passwd | cut -f 6 -d :
|
|
@ -0,0 +1,2 @@
|
|||
# $NetBSD: form,v 1.1 2001/01/05 02:07:01 garbled Exp $
|
||||
script:script1 User to disable?
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: script,v 1.1 2001/01/05 02:07:01 garbled Exp $
|
||||
userdel -vp 1 $1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "User $1 disabled"
|
||||
fi
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: script1,v 1.1 2001/01/05 02:07:01 garbled Exp $
|
||||
cut -f 1 -d ':' /etc/passwd
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
# $NetBSD: index,v 1.1 2001/01/05 02:06:59 garbled Exp $
|
||||
listuser listuser List users on this system
|
||||
adduser adduser Add a new user to the system
|
||||
deluser deluser Delete a user on the system
|
||||
disuser disableuser Disable a user on the system
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: script,v 1.1 2001/01/05 02:07:01 garbled Exp $
|
||||
cat /etc/passwd | awk ' \
|
||||
BEGIN { \
|
||||
FS=":"; \
|
||||
print "Username Real name UID" \
|
||||
} \
|
||||
{ \
|
||||
gsub("&", $1); \
|
||||
printf("%s", $1);
|
||||
for (x=length($1); x < 12; x++ ) \
|
||||
printf(" "); \
|
||||
printf("%s", $5); \
|
||||
for (x=length($5); x < 30; x++ ) \
|
||||
printf(" "); \
|
||||
printf("%7d\n", $3); \
|
||||
}'
|
Loading…
Reference in New Issue