Split rc.conf variables for starting programs into two: an on/off

switch and a set of flags. Get rid of DEFAULT flags entirely. Print
warnings if on/off switches are not set, or are set incorrectly.
Add a shell function to simplify this on/off switch testing.
This commit is contained in:
cjs 1997-08-29 02:24:04 +00:00
parent ff970dc9c5
commit c3b0e18db8
6 changed files with 472 additions and 413 deletions

View File

@ -1,8 +1,15 @@
#!/bin/sh -
#
# $NetBSD: netstart,v 1.42 1997/08/28 18:18:17 mycroft Exp $
# $NetBSD: netstart,v 1.43 1997/08/29 02:24:04 cjs Exp $
# from: @(#)netstart 8.1 (Berkeley) 7/23/93
if [ -f /etc/rc.func ]; then
. /etc/rc.func
else
echo "Can't read /etc/rc.func; aborting."
exit 1;
fi
if [ -f /etc/rc.conf ]; then
. /etc/rc.conf
fi
@ -31,9 +38,16 @@ if [ "$flushroutes" = YES ]; then
fi
# Enable, flush and install packet filter rules before configuring interfaces.
if [ "$ipfilter" != NO ] && [ -f /etc/ipf.conf ]; then
echo 'installing packet filter rules ... '
ipf -E -Fa -f /etc/ipf.conf
if checkyesno ipfilter; then
if [ -f /etc/ipf.conf ]; then
echo 'installing packet filter rules ... '
ipf -E -Fa -f /etc/ipf.conf
else
logger -s "WARNING: /etc/ipf.conf not readable " \
"ipfilter not started."
# abort the boot rather than risk a security problem
exit 1;
fi
fi
# Set the address for the first loopback interface, so that the auto-route
@ -57,7 +71,7 @@ ifconfig lo0 inet localhost
# see the ifconfig manual page for details.
if [ "$net_interfaces" != NO ]; then
if [ "$net_interfaces" = DEFAULT ]; then
if checkyesno auto_ifconfig; then
tmp="`ifconfig -l`"
else
tmp="$net_interfaces"
@ -74,11 +88,11 @@ if [ "$net_interfaces" != NO ]; then
ifconfig $int $args
done) < /etc/ifconfig.$int
else
if [ "$net_interfaces" != DEFAULT ]; then
if [ "$auto_ifconfig" != YES ]; then
echo
echo -n "/etc/ifconfig.$int missing"
echo -n "& ifconfig_$int not set"
echo "; interface $int can't be configured"
echo "WARNING: /etc/ifconfig.$int missing " \
"and ifconfig_$int not set; " \
"interface $int not configured."
fi
continue
fi

280
etc/rc
View File

@ -1,4 +1,4 @@
# $NetBSD: rc,v 1.88 1997/08/26 19:35:33 thorpej Exp $
# $NetBSD: rc,v 1.89 1997/08/29 02:24:05 cjs Exp $
# originally from: @(#)rc 8.2 (Berkeley) 3/17/94
# System startup script run by init on autoboot
@ -67,10 +67,22 @@ umount -a >/dev/null 2>&1
mount /
rm -f /fastboot # XXX (root now writeable)
if [ -f /etc/rc.func ]; then
. /etc/rc.func
else
echo "Can't read /etc/rc.func; aborting."
exit 1;
fi
if [ -f /etc/rc.conf ]; then
. /etc/rc.conf
fi
if [ "$rc_configured" != YES ]; then
echo "/etc/rc.conf is not configured. Multiuser boot aborted."
exit 1
fi
# set flags on ttys. (do early, in case they use tty for SLIP in netstart)
echo 'setting tty flags'
ttyflags -a
@ -110,10 +122,7 @@ rm -f /var/spool/uucp/STST/*
# are logged, then start savecore to get a dump on low memory systems
# and then start the name server.
if [ "$syslogd_flags" != NO ]; then
if [ "$syslogd_flags" = DEFAULT ]; then
syslogd_flags=""
fi
if checkyesno syslogd; then
echo 'starting system logger'
rm -f /dev/log
syslogd $syslogd_flags
@ -121,63 +130,70 @@ fi
# /var/crash should be a directory or a symbolic link
# to the crash directory if core dumps are to be saved.
if [ "$savecore_flags" != NO ] && [ -d /var/crash ]; then
if [ "$savecore_flags" = DEFAULT ]; then
savecore_flags=""
if checkyesno savecore; then
if [ -d /var/crash ]; then
echo checking for core dump...
savecore $savecore_flags /var/crash
else
logger -s "WARNING: no /var/crash directory; savecore not run."
fi
echo checking for core dump...
savecore $savecore_flags /var/crash
fi
if [ "$named_flags" != NO ]; then
if [ "$named_flags" = DEFAULT ]; then
named_flags=""
fi
if checkyesno named; then
echo 'starting name server'; named $named_flags
fi
# set time, if requested
if checkyesno ntpdate; then
if [ "$ntpdate_hosts" = DEFAULT ]; then
ntpdate_hosts=`awk '/^server/ {print $2}' </etc/ntp.conf`
fi
if [ -n "$ntpdate_hosts" ]; then
echo 'Setting date via ntp.'
ntpdate -b $ntpdate_hosts
fi
fi
# now start the rpc servers, for YP server/client.
echo -n 'starting rpc daemons:'
# note that portmap is generally required for all other rpc services.
if [ "$portmap" != NO ]; then
if checkyesno portmap; then
echo -n ' portmap'; portmap
fi
if [ "$ypserv_flags" != NO ]; then
if [ "$ypserv_flags" = DEFAULT ]; then
ypserv_flags="-d"
fi
if checkyesno ypserv; then
echo -n ' ypserv'; ypserv $ypserv_flags
fi
if [ "$ypbind_flags" != NO ]; then
if [ "$ypbind_flags" = DEFAULT ]; then
ypbind_flags=""
fi
if checkyesno ypbind; then
echo -n ' ypbind'; ypbind $ypbind_flags
fi
if [ "$yppasswdd_flags" != NO ]; then
if [ "$yppasswdd_flags" = DEFAULT ]; then
yppasswdd_flags=""
fi
if checkyesno yppasswdd; then
echo -n ' rpc.yppasswdd'; rpc.yppasswdd $yppasswdd_flags
fi
if [ "$bootparamd_flags" != NO ] && [ -r /etc/bootparams ]; then
if [ "$bootparamd_flags" = DEFAULT ]; then
bootparamd_flags=""
if checkyesno bootparamd; then
if [ -r /etc/bootparams ]; then
echo -n ' rpc.bootparamd'; rpc.bootparamd $bootparamd_flags
else
echo
logger -s "WARNING: /etc/bootparams not found. " \
"bootparamd not started."
fi
echo -n ' rpc.bootparamd'; rpc.bootparamd $bootparamd_flags
fi
echo '.'
# load kernel modules specified in /etc/lkm.conf
if [ "$lkm_init" != NO ] && [ -f /etc/rc.lkm ]; then
lkmstage=BEFOREMOUNT
. /etc/rc.lkm
if checkyesno lkm; then
if [ -r /etc/rc.lkm ]; then
lkmstage=BEFOREMOUNT
. /etc/rc.lkm
else
logger -s "WARNING: /etc/rc.lkm not found; LKMs not loaded."
fi
fi
mount -a
@ -187,50 +203,50 @@ echo -n 'starting nfs-rpc daemons:'
nfs_locking=NO
if [ "$nfs_server" = YES ] && [ -r /etc/exports ]; then
if [ "$mountd_flags" = DEFAULT ]; then
mountd_flags=""
if checkyesno nfs_server; then
if [ -r /etc/exports ]; then
rm -f /var/db/mountdtab
echo -n > /var/db/mountdtab
echo -n ' mountd'; mountd $mountd_flags
echo -n ' nfsd'; nfsd $nfsd_flags
nfs_locking=MAYBE
else
echo
logger -s "WARNING: /etc/exports not readable; " \
"NFS server not started."
fi
rm -f /var/db/mountdtab
echo -n > /var/db/mountdtab
echo -n ' mountd'; mountd $mountd_flags
if [ "$nfsd_flags" = DEFAULT ]; then
nfsd_flags="-tun 4"
fi
echo -n ' nfsd'; nfsd $nfsd_flags
nfs_locking=MAYBE
fi
if [ "$nfs_client" = YES ]; then
if [ "$nfsiod_flags" = DEFAULT ]; then
nfsiod_flags="-n 4"
fi
if checkyesno nfs_client; then
echo -n ' nfsiod'; nfsiod $nfsiod_flags
nfs_locking=MAYBE
fi
if [ "$nfs_locking" != NO ]; then
if [ "$statd_flags" != NO ]; then
if [ "$statd_flags" = DEFAULT ]; then
statd_flags=""
fi
if checkyesno statd; then
echo -n ' rpc.statd'; rpc.statd $statd_flags
fi
if [ "$lockd_flags" != NO ]; then
if [ "$lockd_flags" = DEFAULT ]; then
lockd_flags=""
fi
if checkyesno lockd; then
echo -n ' rpc.lockd'; rpc.lockd $lockd_flags
fi
fi
if [ "$amd_flags" != NO ] && [ -d "$amd_dir" -a -r "$amd_master" ]; then
if [ "$amd_flags" = DEFAULT ]; then
amd_flags="-l syslog -x error,noinfo,nostats"
if checkyesno amd; then
if [ -d "$amd_dir" ]; then
if [ -r "$amd_master" ]; then
echo -n ' amd'
amd $amd_flags -p -a $amd_dir `cat $amd_master` \
> /var/run/amd.pid
else
echo
logger -s "WARNING: \$amd_master ($amd_master)not " \
"readable; amd not started."
fi
else
echo
logger -s "WARNING: \$amd_dir ($amd_dir) not a directory; " \
"amd not started."
fi
echo -n ' amd'
amd $amd_flags -p -a $amd_dir `cat $amd_master` > /var/run/amd.pid
fi
echo '.'
@ -241,14 +257,12 @@ if [ -f /sbin/ldconfig ]; then
fi
# load kernel modules specified in /etc/lkm.conf
if [ "$lkm_init" != NO ] && [ -f /etc/rc.lkm ]; then
if checkyesno lkm && [ -f /etc/rc.lkm ]; then
lkmstage=AFTERMOUNT
. /etc/rc.lkm
fi
echo -n 'checking quotas:'
quotacheck -a
echo ' done.'
echo -n 'checking quotas:'; quotacheck -a; echo ' done.'
quotaon -a
# build ps databases
@ -284,7 +298,7 @@ echo clearing /tmp
# Update kernel info in /etc/motd
# Must be done *before* interactive logins are possible to prevent
# possible race conditions.
if [ "$update_motd" != NO ]; then
if checkyesno update_motd; then
echo 'updating motd.'
if [ ! -f /etc/motd ]; then
install -c -o root -g wheel -m 664 /dev/null /etc/motd
@ -303,127 +317,117 @@ if [ -f /var/account/acct ]; then
fi
echo -n standard daemons:
if [ "$update_flags" != NO ]; then
if [ "$update_flags" = DEFAULT ]; then
update_flags="30"
fi
if checkyesno update; then
echo -n ' update'; update $update_flags
fi
echo -n ' cron'; cron
echo '.'
# set time, if requested
if [ "$ntpdate_hosts" != NO ]; then
if [ "$ntpdate_hosts" = DEFAULT ]; then
ntpdate_hosts=`awk '/^server/ {print $2}' </etc/ntp.conf`
fi
if [ -n "$ntpdate_hosts" ]; then
echo 'Setting date via ntp.'
ntpdate -b $ntpdate_hosts
fi
fi
# now start all the other daemons
echo -n starting network daemons:
if [ "$gated_flags" != NO ] && [ -r /etc/gated.conf ]; then
if [ "$gated_flags" = DEFAULT ]; then
gated_flags=""
fi
echo -n ' gated'; gated $gated_flags
elif [ "$routed_flags" != NO ]; then
if [ "$routed_flags" = DEFAULT ]; then
routed_flags="-q"
if checkyesno gated && checkyesno routed; then
echo
logger -s "WARNING: gated and routed both requested to be run: " \
"running only gated."
routed=NO
fi
if checkyesno gated; then
if [ -r /etc/gated.conf ]; then
echo -n ' gated'; gated $gated_flags
else
logger -s "WARNING: no /etc/gated.conf; gated not started."
fi
fi
if checkyesno routed; then
echo -n ' routed'; routed $routed_flags
fi
if [ "$mrouted_flags" != NO ]; then
if [ "$mrouted_flags" = DEFAULT ]; then
mrouted_flags=""
fi
if checkyesno mrouted; then
echo -n ' mrouted'; mrouted $mrouted_flags
fi
if [ "$timed_flags" != NO ]; then
if [ "$timed_flags" = DEFAULT ]; then
timed_flags=""
fi
if checkyesno timed; then
echo -n ' timed'; timed $timed_flags
fi
if [ "$xntpd_flags" != NO ]; then
if [ "$xntpd_flags" = DEFAULT ]; then
xntpd_flags="-p /var/run/xntpd.pid"
fi
if checkyesno xntpd; then
echo -n ' xntpd'; xntpd $xntpd_flags
fi
if [ "$dhcpd_flags" != NO ] && [ -r /etc/dhcpd.conf ]; then
if [ "$dhcpd_flags" = DEFAULT ]; then
dhcpd_flags=""
if checkyesno dhcpd; then
if [ -r /etc/dhcpd.conf ]; then
echo -n ' dhcpd'; dhcpd $dhcpd_flags
else
echo
logger -s "WARNING: /etc/dhcpd.conf not readable; " \
"dhcpd not started."
fi
echo -n ' dhcpd'; dhcpd $dhcpd_flags
fi
if [ "$rwhod" = YES ]; then
if checkyesno rwhod; then
echo -n ' rwhod'; rwhod
fi
if [ "$lpd_flags" != NO ]; then
if [ "$lpd_flags" = DEFAULT ]; then
lpd_flags=""
fi
echo -n ' printer'; lpd $lpd_flags
if checkyesno lpd; then
echo -n ' lpd'; lpd $lpd_flags
fi
# We call sendmail with a full path so that SIGHUP works.
if [ "$sendmail_flags" != NO ] && [ -r /etc/sendmail.cf ]; then
if [ "$sendmail_flags" = DEFAULT ]; then
sendmail_flags="-bd -q30m"
if checkyesno sendmail; then
if [ -r /etc/sendmail.cf ]; then
echo -n ' sendmail'; /usr/sbin/sendmail $sendmail_flags
else
echo
logger -s "WARNING: /etc/sendmail.cf not readable; " \
"sendmail not started."
fi
echo -n ' sendmail'; /usr/sbin/sendmail $sendmail_flags
fi
if [ "$rarpd_flags" != NO ] && [ -r /etc/ethers ]; then
if [ "$rarpd_flags" = DEFAULT ]; then
rarpd_flags="-a"
if checkyesno rarpd; then
if [ -r /etc/ethers ]; then
echo -n ' rarpd'; rarpd $rarpd_flags
else
echo
logger -s "WARNING: /etc/ethers not readable; " \
"rarpd not started."
fi
echo -n ' rarpd'; rarpd $rarpd_flags
fi
if [ "$rbootd_flags" != NO ] && [ -r /etc/rbootd.conf ]; then
if [ "$rbootd_flags" = DEFAULT ]; then
rbootd_flags=""
if checkyesno rbootd; then
if [ -r /etc/rbootd.conf ]; then
echo -n ' rbootd'; rbootd $rbootd_flags
else
echo
logger -s "WARNING: /etc/rbootd.conf not readable; " \
"rarpd not started."
fi
echo -n ' rbootd'; rbootd $rbootd_flags
fi
if [ "$mopd_flags" != NO ]; then
if [ "$mopd_flags" = DEFAULT ]; then
mopd_flags="-a"
fi
if checkyesno mopd; then
echo -n ' mopd'; mopd $mopd_flags
fi
if [ "$apmd_flags" != NO ]; then
if [ "$apmd_flags" = DEFAULT ]; then
apmd_flags=""
fi
if checkyesno apmd; then
echo -n ' apmd'; apmd $apmd_flags
fi
if [ "$inetd_flags" != NO ] && [ -r /etc/inetd.conf ]; then
if [ "$inetd_flags" = DEFAULT ]; then
inetd_flags=""
if checkyesno inetd; then
if [ -r /etc/inetd.conf ]; then
echo -n ' inetd'; inetd $inetd_flags
else
echo
logger -s "WARNING: /etc/inetd.conf not readable; " \
"inetd not started."
fi
echo -n ' inetd'; inetd $inetd_flags
fi
echo '.'
# Kerberos runs ONLY on the Kerberos server machine
if [ "$kerberos_server" = YES ]; then
if checkyesno kerberos; then
echo -n 'starting kerberos daemons:'
echo -n ' kerberos'; kerberos >> /var/log/kerberos.log &
echo -n ' kadmind'; kadmind -n >> /var/log/kadmind.log &

View File

@ -1,78 +1,76 @@
# $NetBSD: rc.conf,v 1.15 1997/08/03 22:24:21 perry Exp $
# $NetBSD: rc.conf,v 1.16 1997/08/29 02:24:06 cjs Exp $
#
# see rc.conf(5) for more information.
# uncomment this if you want to use local paths in rc
#export PATH=$PATH:/usr/local/sbin:/usr/local/bin
export PATH=$PATH:/usr/local/sbin:/usr/local/bin
# `NO' disables a toggle or a program with flags.
# `YES' enables a toggle.
# `DEFAULT' enables a program with the default flags (as listed).
# Any other string is used as a set of flags.
# Use program=YES to enable program, NO to disable it. program_flags are
# passed to the program on the command line.
# Netstart actions
flushroutes=YES # Flush routes in netstart (YES or NO)
# If this is not set to YES, the system will drop into single-user mode.
rc_configured=NO
# Basic network configuration
hostname="" # Name of host. If "", extract from /etc/myname
domainname="" # Domainname. If "", try /etc/defaultdomain
defaultroute="" # Default route. If "", try /etc/mygate
hostname="" # if blank, use /etc/myname
domainname="" # if blank, use /etc/domainname
defaultroute="" # if blank, use /etc/mygate
# Actions to take on boot
update_motd=YES # YES or NO
# One-time actions and programs on boot-up.
lkm=YES # run /etc/rc.lkm
savecore=YES savecore_flags=""
update_motd=YES # updates /etc/motd
# Programs run on boot
savecore_flags=DEFAULT # default: ""
lkm_init=YES # YES or NO.
ipfilter=NO # YES or NO.
ntpdate_hosts=NO # default: extract from /etc/ntp.conf
# Networking startup
ipfilter=NO # uses /etc/ipf.conf
auto_ifconfig=YES # config all avail. interfaces
net_interfaces="" # used only if above is NO
flushroutes=YES # flush routes in netstart
ntpdate=YES ntpdate_hosts="" # blank: hosts in /etc/ntp.conf
# Network Interfaces
net_interfaces=DEFAULT # default: use "ifconfig -l" to get a list
# Daemons required for other daemons
inetd_flags=DEFAULT # default: ""; use "-l" for libwrap logging
portmap=YES # YES or NO; normally required.
# Daemons required by other daemons
inetd=YES inetd_flags="" # -l will log libwrap
portmap=YES
# Commonly used daemons
update_flags=DEFAULT # default: "30"
syslogd_flags=DEFAULT # default: ""
timed_flags=NO # default: ""
xntpd_flags=NO # default: "-p /var/run/xntpd.pid"
sendmail_flags=NO # default: "-bd -q30m"
named_flags=NO # default: ""
lpd_flags=DEFAULT # default: ""
update=YES update_flags="30"
syslogd=YES syslogd_flags=""
named=NO named_flags=""
timed=NO timed_flags=""
xntpd=YES xntpd_flags="-p /var/run/xntpd.pid"
sendmail=YES sendmail_flags="-bd -q30m"
lpd=YES lpd_flags=""
# Routing Daemons
routed_flags=DEFAULT # default: "-q"
gated_flags=NO # default: "" (not distributed with NetBSD)
mrouted_flags=NO # default: ""
# Routing daemons
routed=NO routed_flags="-q"
gated=NO gated_flags=""
mrouted=NO mrouted_flags=""
# Daemons used to boot other machines over a network
rarpd_flags=NO # default: "-a"
bootparamd_flags=NO # default: ""
dhcpd_flags=NO # default: ""
rbootd_flags=NO # default: ""
mopd_flags=NO # default: "-a"
# Daemons used to boot other hosts over a network
rarpd=NO rarpd_flags="-a"
bootparamd=NO bootparamd_flags=""
dhcpd=NO dhcpd_flags=""
rbootd=NO rbootd_flags=""
mopd=NO mopd_flags="-a"
# YP (NIS) daemons
ypbind_flags=NO # default: ""
ypserv_flags=NO # default: "-d"
yppasswdd_flags=NO # default: ""
ypbind=NO ypbind_flags=""
ypserv=NO ypserv_flags="-d"
yppasswdd=NO yppasswdd_flags=""
# Network file system daemons
nfs_client=NO # YES or NO.
nfsiod_flags=DEFAULT # default: "-n 4"
nfs_server=NO # YES or NO.
mountd_flags=DEFAULT # default: ""
nfsd_flags=DEFAULT # default: "-tun 4"
lockd_flags=NO # default: ""
statd_flags=NO # default: ""
amd_flags=NO # default: "-l syslog -x error,noinfo,nostats"
amd_dir=/amd # AMD's mount directory
amd_master=/etc/amd/master # AMD 'master' map
# NFS daemons and parameters
nfs_client=YES # enable client daemons
nfsiod_flags="-n 4"
nfs_server=NO # enable server daemons
mountd_flags=""
nfsd_flags="-tun 4"
lockd=NO lockd_flags=""
statd=NO statd_flags=""
amd=NO amd_flags="-l syslog -x error,noinfo,nostats"
amd_dir=/amd # mount dir
amd_master=/etc/amd/master # master map
# Other daemons:
apmd_flags=NO # default: ""
rwhod=NO # YES or NO.
kerberos_server=NO # YES or NO.
# Other daemons
apmd=NO apmd_flags=""
rwhod=YES
kerberos=NO

View File

@ -1,4 +1,4 @@
# $NetBSD: rc.local,v 1.20 1997/04/19 03:10:58 perry Exp $
# $NetBSD: rc.local,v 1.21 1997/08/29 02:24:07 cjs Exp $
# originally from: @(#)rc.local 8.3 (Berkeley) 4/28/94
#
# This file is (nearly) the last thing invoked by /etc/rc during a
@ -11,4 +11,6 @@ echo -n 'starting local daemons:'
# add your local daemons here, following the startup models in /etc/rc
echo -n ' sshd'; sshd
echo '.'

23
etc/rc.subr Normal file
View File

@ -0,0 +1,23 @@
# $NetBSD: rc.subr,v 1.1 1997/08/29 02:24:08 cjs Exp $
# functions used by various rc scripts
# Test $1 variable, and warn if not set to YES or NO.
checkyesno() {
eval value=\$${1};
if [ "$value" = YES ]; then
return 0;
else
if [ "$value" != NO ]; then
logger -s "WARNING: \$${1} is not set properly."
fi
return 1;
fi
}
# Set $1_flags to $2 if it's currently "DEFAULT".
checkflags() {
eval value=\$${1}_flags;
if [ "$value" = DEFAULT ]; then
eval ${1}_flags="\$2";
fi
}

View File

@ -1,4 +1,4 @@
.\" $NetBSD: rc.conf.5,v 1.9 1997/05/12 11:28:19 lukem Exp $
.\" $NetBSD: rc.conf.5,v 1.10 1997/08/29 02:27:31 cjs Exp $
.\"
.\" Copyright (c) 1996 Matthew R. Green
.\" Copyright (c) 1997 Curt J. Sampson
@ -59,15 +59,21 @@ Listed below are the
.Nm
variables that may be set, the values that each may be set to,
a brief description of what each variable does, and a reference to
relevant manual pages. Most
variables have three values: a list of parameters to pass on the
command line, "DEFAULT" for a reasonable default set of parameters,
or "NO" if the daemon is not to be run at all. Some programs don't
take a set of flags, and may only be set to "YES" or "NO". A few are
always run, and will not take "NO."
The arguments passed if "DEFAULT" is chosen are listed in
.Nm
itself.
relevant manual pages.
.Pp
Most variables are one of two types: enabling variables or flags
variables. Enabling variables, such as
.Sy inetd ,
are generally named after the program or the system they enable,
and are set to "YES" or "NO". Flags variables, such as
.Sy inetd_flags
have the same name with "_flags" appended, and determine what
arguments are passed to the program if it is enabled.
.Pp
If a variable that
.Pa /etc/rc
expects to be set is not set, or the value is not one of the allowed
values, a warning will be printed.
.Pp
Basic network configuration:
.Bl -tag -width bootparamd_flags
@ -77,7 +83,7 @@ If empty or not set, then the contents of
.Pa /etc/myname
(if it exists) are used.
.It Sy domainname
YP domain of host.
YP (NIS) domain of host.
If empty or not set, then the contents of
.Pa /etc/defaultdomain
(if it exists) are used.
@ -88,8 +94,15 @@ If empty or not set, then the contents of
(if it exists) are used.
.El
.Pp
Actions to perform on boot-up:
One time actions to perform or programs to run on boot-up:
.Bl -tag -width bootparamd_flags
.It Sy lkm
YES or NO. Runs /etc/rc.lkm.
.It Sy savecore
YES or NO. Runs the
.Xr savecore 8
program. Passes
.Sy savecore_flags .
.It Sy update_motd
YES or NO. Updates the
.Nx
@ -99,70 +112,36 @@ file to reflect the version of the running kernel. See
.Xr motd 5 .
.El
.Pp
Programs run on boot-up:
Networking startup:
.Bl -tag -width bootparamd_flags
.It Sy savecore_flags
Parameters, DEFAULT or NO.
Saves a copy of the kernel and crash dump when the system comes up
after a crash. The
.Ar -z
parameter will compress the kernel and crash dump. See
.Xr savecore 8 .
.It Sy lkm_init
YES or NO. Loads
.Xr lkm 4
modules based on information in
.Pa /etc/lkm.conf .
See
.Xr lkm.conf 5 .
.It Sy ipfilter
YES or NO. Runs
YES or NO. Runs
.Xr ipf 8
to load in packet filter specifications from
to load in a packet filter specifications from
.Pa /etc/ipf.conf
at network boot time, before any interfaces are configured. See
.Xr ipf 5 .
.It Sy ntpdate_hosts
Parameters, DEFAULT or NO.
List of time servers for
.Xr ntpdate 8 .
If DEFAULT, the list of servers is loaded from
.Pa /etc/ntp.conf .
.El
.Pp
Interface boot-up configuration:
.Bl -tag -width bootparamd_flags
.It Sy net_interfaces
Parameters, DEFAULT, or NO.
Lists a set of interfaces to be configured with
.Xr ifconfig 8
at boot time.
If DEFAULT, the interfaces are found by running
.It Sy auto_ifconfig
YES or NO. Sets the
.Sy net_interfaces
variable (see below) to the output of
.Xr ifconfig 8
with the
.Fl l
flag. Usually, the parameters for the subsequent
.Xr ifconfig 8
commands are found in files named
.Pa /etc/ifconfig.* ,
where
.Dq *
is the name of each interface (e.g.
.Pa /etc/ifconfig.le0 ) .
Alternatively, the parameters may be taken from an
.Sy ifconfig_*
variable (see below). In either case, the parameters have the interface
name prepended to them and are then handed to
.Xr ifconfig 8 .
.It Sy ifconfig_*
Parameters only.
Supplies a set of parameters for configuring the given interface
.Dq *
(e.g.
.Sy ifconfig_le0 ) .
See
.Sy net_interfaces
above.
.Sy -l
flag and suppresses warnings about interfaces in this list that
do not have an ifconfig file or variable.
.It Sy net_interfaces
The list of network interfaces to be configured at boot time.
For each interface "xxn", the system first looks for ifconfig
parameters in
.Pa /etc/ifconfig.xxn
and then in the variable
.Sy ifconfig_xnn .
The contents of the file or the variable are handed to ifconfig
after the interface name. If
.Sy auto_ifconfig
is set to "NO" and neither the file nor the variable is found,
a warning is printed.
.It Sy ifaliases_*
List of
.Sq Ar "address netmask"
@ -176,18 +155,33 @@ If
is
.Dq - ,
then use the default netmask for the interface.
.It Sy flushroutes
YES or NO. Flushes the route table on networking startup. Useful
when coming up to multiuser mode after going down to single-user
mode.
.It Sy ntpdate
YES or NO. Runs
.Xr ntpdate 8
to set the system time from one of the hosts in
.Sy ntpdate_hosts .
If
.Sy ntpdate_hosts
is empty, it will attempt to find a list of hosts in
.Pa /etc/ntp.conf .
.El
.Pp
Daemons required for other daemons:
.Pp
Daemons required by other daemons:
.Bl -tag -width bootparamd_flags
.It Sy inetd_flags
Parameters, DEFAULT or NO.
Starts other internet programs (as listed in
.It Sy inetd
YES or NO. Runs the
.Xr inetd 8
daemon to start other internet programs (as listed in
.Pa /etc/inetd.conf )
as necessary. The
as necessary. Passes
.Sy inetd_flags .
The
.Ar -l
option turns on libwrap connection logging. See
.Xr inetd 8 .
flag turns on libwrap connection logging.
.It Sy portmap
YES or NO. The
.Xr portmap 8
@ -203,189 +197,213 @@ and
.Pp
Commonly used daemons:
.Bl -tag -width bootparamd_flags
.It Sy update_flags
Parameters or DEFAULT. The
.It Sy update
YES or NO. Runs
.Xr update 8
daemon flushes cached disk pages that are dirty to disk at regular intervals.
.It Sy syslogd_flags
Parameters, DEFAULT or NO.
Syslog daemon; logs messages to logfiles. See
.Xr syslogd 8 .
.It Sy timed_flags
Parameters, DEFAULT or NO.
Local area network time synchronisation daemon. The
and passes
.Sy update_flags .
.It Sy syslogd
YES or NO. Runs
.Xr syslogd 8
and passes
.Sy syslogd_flags .
.It Sy named
YES or NO. Runs
.Xr named 8
and passes
.Sy named_flags .
.It Sy timed
YES or NO. Runs
.Xr timed 8
and passes
.Sy timed_flags .
The
.Ar -M
parameter allows this host to be a master, as well as a slave. See
option allows
.Xr timed 8
to be a master time source as well as a slave. If you are also running
.Xr xntpd 8 ,
only one machine running both should have the
.Ar -M
flag given to
.Xr timed 8 .
.It Sy xntpd_flags
Parameters, DEFAULT or NO.
Local and wide area network time synchronisation daemon. If this is used,
.Sy timed_flags
should be set to
.Dq Ar -M -F localhost
on one xntp-using host on the network, and to "NO"
on any other xntp-using host.
.It Sy sendmail_flags
Parameters, DEFAULT or NO.
Sendmail SMTP mail transport agent. See
.It Sy xntpd
YES or NO. Runs
.Xr xntpd 8
and passes
.Sy xntpd_flags .
.It Sy sendmail
YES or NO. Runs
.Xr sendmail 8 .
.It Sy named_flags
Parameters, DEFAULT or NO.
BIND domain name resolver and server. See
.Xr named 8 .
.It Sy lpd_flags
Parameters, DEFAULT or NO.
Line printer daemon; allows other hosts to print to the local host's printer.
and passes it
.Sy sendmail_flags .
.It Sy lpd
YES or NO. Runs
.Xr lpd 8
and passes
.Sy lpd_flags .
The
.Ar -l
option turns on extra logging. See
.Xr lpd 8 .
flag will turn on extra logging.
.El
.Pp
Routing daemons:
.Bl -tag -width bootparamd_flags
.It Sy routed_flags
Parameters, DEFAULT or NO.
RIP routing protocol daemon. This should be NO if
.Sy gated_flags
is anything but NO. See
.Xr routed 8 .
.It Sy gated_flags
Parameters, DEFAULT or NO.
Routing daemon for many IP routing protocols.
.It Sy routed
YES or NO. Runs
.Xr routed 8 ,
the RIP routing protocol daemon. Passes
.Sy routed_flags .
This should be NO if
.Sy routed_flags
is anything but NO.
.Sy gated
is YES.
.It Sy gated
YES or NO. Runs
.Xr gated 8 ,
the multiprotocol routing daemon. Passes
.Sy gated_flags .
This should be NO if
.Sy routed
is YES.
.Xr gated 8
is not included with
.Nx .
.It Sy mrouted_flags
Parameters, DEFAULT or NO.
DVMRP multicast routing protocol daemon. See
.Xr mrouted 8 .
.It Sy mrouted
YES or NO. Runs
.Xr mrouted 8 ,
the DVMRP multicast routing protocol daemon. Passes
.Sy mrouted_flags .
.El
.Pp
Daemons used to boot other hosts over a network:
.Bl -tag -width bootparamd_flags
.It Sy rarpd_flags
Parameters, DEFAULT or NO.
Reverse ARP daemon; used to boot
.It Sy rarpd
YES or NO. Runs
.Xr rarpd 8 ,
the reverse ARP daemon, often used to boot
.Nx
and Sun workstations. See
.Xr rarpd 8 .
.It Sy bootparamd_flags
Parameters, DEFAULT or NO.
Boot parameter server; used for booting
and Sun workstations. Passes
.Sy rarpd_flags .
.It Sy bootparamd
YES or NO. Runs
.Xr bootparamd 8 ,
the boot parameter server, with
.Sy bootpramd_flags
as options. Used to boot
.Nx
and SunOS 4.x systems. See
.Xr bootparamd 8 .
.It Sy dhcpd_flags
Parameters, DEFAULT or NO.
Dynamic Host Configuration Protocol daemon, for assigning IP addresses to
hosts and passing boot information. See
.Xr dhcpd 8 .
.It Sy rbootd_flags
Parameters, DEFAULT or NO.
HP boot protocol daemon; used for booting HP workstations. See
.Xr rbootd 8 .
.It Sy mopd_flags
Parameters, DEFAULT or NO.
DEC MOP protocol daemon; used for booting VAX and other DEC machines. See
.Xr mopd 8 .
and SunOS 4.x systems.
.It Sy dhcpd
YES or NO. Runs
.Xr dhcpd 8 ,
the Dynamic Host Configuration Protocol daemon, for assigning IP addresses to
hosts and passing boot information. Passes
.Sy dhcpd_flags .
.It Sy rbootd
YES or NO. Runs
.Xr rbootd 8 ,
the HP boot protocol daemon; used for booting HP workstations. Passes
.Sy rbootd_flags .
.It Sy mopd
YES or NO. Runs
.Xr mopd 8 ,
the DEC MOP protocol daemon; used for booting VAX and other DEC machines.
Passes
.Sy mopd_flags .
.El
.Pp
YP (NIS) daemons:
.Bl -tag -width bootparamd_flags
.It Sy ypbind_flags
Parameters, DEFAULT or NO.
Run on YP (NIS) clients to use information from a YP server. See
.Xr ypbind 8 .
.It Sy ypserv_flags
Parameters, DEFAULT or NO.
YP (NIS) server for distributing information from certain files in
.It Sy ypbind
YES or NO. Runs
.Xr ypbind 8 ,
which lets YP (NIS) clients use information from a YP server. Passes
.Sy ypbind_flags .
.It Sy ypserv
YES or NO. Runs
.Xr ypserv 8 ,
the YP (NIS) server for distributing information from certain files in
.Pa /etc .
See
.Xr ypserv 8 .
.It Sy yppasswdd_flags
Parameters, DEFAULT or NO.
Allows remote YP users to update password on master server. See
.Xr yppasswdd 8 .
Passes
.Sy ypserv_flags .
The
.Ar -d
flag causes it to use DNS for lookups in
.Pa /etc/hosts
that fail.
.It Sy yppasswdd
YES or NO. Runs
.Xr yppasswdd 8 ,
which allows remote YP users to update password on master server. Passes
.Sy yppasswdd_flags .
.El
.Pp
Network file system daemons:
NFS daemons and parameters:
.Bl -tag -width bootparamd_flags
.It Sy nfs_client
YES or NO. Runs
.Xr nfsiod 8
to increase performance of an NFS client host.
.It Sy nfsiod_flags
Parameters or DEFAULT. Flags passed to
.Xr nfsiod 8
if
.Sy nfs_client
is set to YES.
to increase performance of an NFS client host. Passes
.Sy nfsiod_flags .
.It Sy nfs_server
YES or NO. Sets up a host to be a NFS server by running
.Xr mountd 8
and
.Xr nfsd 8 .
.It Sy mountd_flags
Parameters or DEFAULT. These are passed to
.Xr mountd 8
if
.Sy nfs_server
is set to YES.
.It Sy nfsd_flags
Parameters or DEFAULT. These are passed to
.Xr nfsd 8
if
.Sy nfs_server
is set to YES.
.It Sy lockd_flags
Parameters, DEFAULT or NO. Provides locking for NFS. Ignored if
.Sy nfs_server
.Xr nfsd 8 , and passing
.Sy mountd_flags
and
.Sy nfs_client
are both set to NO. See
.Xr rpc.lockd 8 .
.It Sy statd_flags
Parameters, DEFAULT or NO. Ignored if
.Sy nfs_server
and
.Sy nfs_client
are both set to NO. Status monitoring daemon used when
.Sy nfsd_flags
to them, respectively.
.It Sy lockd
YES or NO. Runs
.Xr rpc.lockd 8
is running. See
.Xr rpc.statd 8 .
.It Sy amd_flags
Parameters, DEFAULT or NO.
The automounter daemon,
if either
.Sy nfs_server
or
.Sy nfs_client
is (or both are) set to YES. Passes
.Sy lockd_flags .
.It Sy statd
YES or NO. Runs
.Xr rpc.statd 8 ,
a status monitoring daemon used when
.Xr lockd 8
is running, if either
.Sy nfs_server
or
.Sy nfs_client
is (or both are) set to YES. Passes
.Sy statd_flags .
.It Sy amd
YES or NO. Runs
.Xr amd 8 ,
automatically mounts NFS file systems whenever a file or directory within
that filesystem is accessed.
the automounter daemon, which automatically mounts NFS file systems
whenever a file or directory within that filesystem is accessed. Passes
.Sy amd_flags .
.It Sy amd_dir
The
.Xr amd 8
mount directory. Used only if
.Sy amd_flags
is not set to NO.
.Sy amd
is set to YES.
.It Sy amd_master
The
.Xr amd 8
automounter master map.
Used only if
.Sy amd_flags
is not set to NO.
.Sy amd
is set to YES.
.El
.Pp
Other daemons:
.Bl -tag -width bootparamd_flags
.It Sy rwhod
YES or NO. Daemon to support
.Xr rwho 8
command. See
YES or NO. Runs
.Xr rwhod 8 .
.It Sy kerberos_server
to support the
.Xr rwho 8
command.
.It Sy kerberos
YES or NO. Runs the kerberos server
.Xr kerberos 8
and the kerberos admininstration server,