mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-24 11:29:10 +00:00
Sync with NetBSD's mainline.
This commit is contained in:
parent
d9bc822f0f
commit
be026881b1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/vendor/NetBSD/dist/; revision=98576
@ -1,12 +1,10 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: DAEMON,v 1.4 2000/08/21 23:39:07 lukem Exp $
|
||||
# $NetBSD: DAEMON,v 1.7 2002/01/31 01:26:05 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: DAEMON
|
||||
# REQUIRE: accounting aftermountlkm amd cleartmp dmesg ipmon
|
||||
# REQUIRE: ipnat ipsec ldconfig named network nonlocalswap nfslocking
|
||||
# REQUIRE: pwcheck quota savecore securelevel sysctl sysdb virecover ypbind
|
||||
# REQUIRE: NETWORKING SERVERS
|
||||
|
||||
# This is a dummy dependancy, to ensure that general purpose daemons
|
||||
# This is a dummy dependency, to ensure that general purpose daemons
|
||||
# are run _after_ the above are.
|
||||
|
@ -1,14 +1,12 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: LOGIN,v 1.3 2000/07/20 23:36:56 lukem Exp $
|
||||
# $NetBSD: LOGIN,v 1.6 2001/04/19 16:00:29 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: LOGIN
|
||||
# REQUIRE: apmd bootparams dhcpd dhcrelay gated local lpd mopd motd
|
||||
# REQUIRE: mrouted ntpd rarpd rbootd route6d routed rtadvd rtsold
|
||||
# REQUIRE: rwho screenblank timed wscons xfs yppasswdd
|
||||
# REQUIRE: DAEMON
|
||||
|
||||
# This is a dummy dependancy to ensure user services such as xdm,
|
||||
# This is a dummy dependency to ensure user services such as xdm,
|
||||
# inetd, cron and kerberos are started after everything else, incase
|
||||
# the administrator has increased the system security level and
|
||||
# wants to delay user logins until the system is (almost) fully
|
||||
|
@ -1,20 +1,23 @@
|
||||
# $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $
|
||||
# $NetBSD: Makefile,v 1.28 2002/04/24 08:18:47 lukem Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
FILES= DAEMON LOGIN NETWORK SERVERS accounting amd apmd bootparams \
|
||||
bootconf.sh ccd cleartmp cron dhclient dhcpd dhcrelay dmesg \
|
||||
fsck gated inetd ipfilter ipmon ipnat ipsec isdnd kdc ldconfig \
|
||||
lkm1 lkm2 lkm3 local lpd mopd motd mountall mountcritlocal \
|
||||
mountcritremote mountd mrouted named network newsyslog nfsd \
|
||||
nfslocking ntpd ntpdate rpcbind poffd postfix ppp pwcheck racoon \
|
||||
quota raidframe rarpd rbootd root route6d routed rtadvd rtsold rwho \
|
||||
savecore screenblank sendmail securelevel sshd swap1 swap2 sysdb \
|
||||
sysctl syslogd timed ttys virecover wscons xdm xfs ypbind \
|
||||
yppasswdd ypserv
|
||||
FILES= DAEMON LOGIN NETWORKING SERVERS \
|
||||
accounting altqd amd apmd \
|
||||
bootparams bootconf.sh ccd cleartmp cron \
|
||||
dhclient dhcpd dhcrelay dmesg downinterfaces fsck \
|
||||
ifwatchd inetd ipfilter ipfs ipmon ipnat ipsec isdnd kdc \
|
||||
ldconfig lkm1 lkm2 lkm3 local lpd \
|
||||
mixerctl mopd motd mountall mountcritlocal mountcritremote mountd \
|
||||
moused mrouted \
|
||||
named ndbootd network newsyslog nfsd nfslocking ntpd ntpdate \
|
||||
poffd postfix ppp pwcheck quota \
|
||||
racoon rpcbind raidframe rarpd rbootd root \
|
||||
route6d routed rtadvd rtsold rwho \
|
||||
savecore screenblank sendmail securelevel sshd \
|
||||
swap1 swap2 sysdb sysctl syslogd \
|
||||
timed ttys virecover wscons xdm xfs ypbind yppasswdd ypserv
|
||||
FILESDIR= /etc/rc.d
|
||||
FILESMODE= ${BINMODE}
|
||||
|
||||
NOPROG= noprog
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
9
etc/rc.d/NETWORKING
Normal file
9
etc/rc.d/NETWORKING
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: NETWORKING,v 1.1 2002/01/31 01:26:05 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: NETWORKING NETWORK
|
||||
|
||||
# This is a dummy dependency, for services which require networking
|
||||
# to be operational before starting.
|
@ -1,10 +1,10 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: SERVERS,v 1.4 2000/09/21 10:38:04 ad Exp $
|
||||
# $NetBSD: SERVERS,v 1.8 2001/04/26 03:56:20 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: SERVERS
|
||||
# REQUIRE: ipmon kdc newsyslog ppp savecore syslogd ike
|
||||
# REQUIRE: mountcritremote
|
||||
|
||||
# This is a dummy dependancy, for early-start servers relying on
|
||||
# This is a dummy dependency, for early-start servers relying on
|
||||
# some basic configuration.
|
||||
|
@ -1,30 +1,35 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: accounting,v 1.2 2000/05/13 08:45:06 lukem Exp $
|
||||
# $NetBSD: accounting,v 1.6 2001/04/29 23:57:25 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: accounting
|
||||
# REQUIRE: mountall
|
||||
# BEFORE: DAEMON
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="accounting"
|
||||
rcvar=$name
|
||||
accounting_command="/usr/sbin/accton"
|
||||
accounting_file="/var/account/acct"
|
||||
start_cmd="accounting_start"
|
||||
stop_cmd="accounting_stop"
|
||||
|
||||
accounting_start()
|
||||
{
|
||||
if [ -f /var/account/acct ]; then
|
||||
echo "Turning on accounting."
|
||||
/usr/sbin/accton /var/account/acct
|
||||
if [ ! -f ${accounting_file} ]; then
|
||||
echo "Creating accounting file ${accounting_file}"
|
||||
( umask 022 ; > ${accounting_file} )
|
||||
fi
|
||||
echo "Turning on accounting."
|
||||
${accounting_command} ${accounting_file}
|
||||
}
|
||||
|
||||
accounting_stop()
|
||||
{
|
||||
echo "Turning off accounting."
|
||||
/usr/sbin/accton
|
||||
${accounting_command}
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
|
21
etc/rc.d/altqd
Normal file
21
etc/rc.d/altqd
Normal file
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: altqd,v 1.1 2001/04/05 23:55:00 thorpej Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: altqd
|
||||
# REQUIRE: network mountcritlocal dhclient
|
||||
# BEFORE: NETWORKING
|
||||
# KEYWORD: shutdown
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="altqd"
|
||||
rcvar=$name
|
||||
command="/usr/sbin/${name}"
|
||||
pidfile="/var/run/${name}.pid"
|
||||
required_files="/etc/altq.conf"
|
||||
extra_commands="reload"
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: amd,v 1.6 2000/09/19 13:04:38 lukem Exp $
|
||||
# $NetBSD: amd,v 1.9 2002/03/22 04:33:58 thorpej Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: amd
|
||||
# REQUIRE: rpcbind mountall ypbind
|
||||
# BEFORE: DAEMON
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: apmd,v 1.3 2000/05/13 08:45:06 lukem Exp $
|
||||
# $NetBSD: apmd,v 1.4 2000/09/19 13:04:38 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: apmd
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: bootconf.sh,v 1.2 2000/08/21 23:34:45 lukem Exp $
|
||||
# $NetBSD: bootconf.sh,v 1.4 2002/03/24 15:08:58 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: bootconf
|
||||
@ -20,9 +20,13 @@ bootconf_start()
|
||||
else
|
||||
default=current
|
||||
fi
|
||||
if [ "$default" = "current" ]; then
|
||||
def=`ls -ld /etc/etc.current 2>&1`
|
||||
default="${def##*-> etc.}"
|
||||
fi
|
||||
|
||||
spc=""
|
||||
for i in /etc/etc.*
|
||||
do
|
||||
for i in /etc/etc.*; do
|
||||
name="${i##/etc/etc.}"
|
||||
case $name in
|
||||
current|default|\*)
|
||||
@ -43,11 +47,11 @@ bootconf_start()
|
||||
_DUMMY=/etc/passwd
|
||||
conf=${_DUMMY}
|
||||
while [ ! -d /etc/etc.$conf/. ]; do
|
||||
trap "conf=$default; echo; echo Using default of $conf" 14
|
||||
trap "conf=$default; echo; echo Using default of $conf" ALRM
|
||||
echo -n "Which configuration [$default] ? "
|
||||
(sleep 30 && kill -ALRM $master) >/dev/null 2>&1 &
|
||||
read conf
|
||||
trap : 14
|
||||
trap : ALRM
|
||||
if [ -z $conf ] ; then
|
||||
conf=$default
|
||||
fi
|
||||
@ -55,8 +59,16 @@ bootconf_start()
|
||||
conf=${_DUMMY}
|
||||
fi
|
||||
done
|
||||
rm -f /etc/etc.current
|
||||
ln -s /etc/etc.$conf /etc/etc.current
|
||||
|
||||
case $conf in
|
||||
current|default)
|
||||
;;
|
||||
*)
|
||||
rm -f /etc/etc.current
|
||||
ln -s /etc/etc.$conf /etc/etc.current
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -f /etc/rc.conf ] ; then
|
||||
. /etc/rc.conf
|
||||
fi
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: bootparams,v 1.4 2000/06/02 22:54:11 fvdl Exp $
|
||||
# $NetBSD: bootparams,v 1.5 2000/09/19 13:04:38 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: bootparams
|
||||
# REQUIRE: rpcbind DAEMON
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: cleartmp,v 1.2 2000/05/13 08:45:06 lukem Exp $
|
||||
# $NetBSD: cleartmp,v 1.3 2000/09/19 13:04:38 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: cleartmp
|
||||
# REQUIRE: mountall
|
||||
# BEFORE: DAEMON
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: dhclient,v 1.6 2000/07/26 00:11:49 lukem Exp $
|
||||
# $NetBSD: dhclient,v 1.7 2000/09/19 13:04:38 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: dhclient
|
||||
# REQUIRE: network mountcritlocal
|
||||
# BEFORE: NETWORKING
|
||||
#
|
||||
# Note that there no syslog logging of dhclient messages at boot because
|
||||
# dhclient needs to start before services that syslog depends upon do.
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: dhcpd,v 1.3 2000/05/13 08:45:06 lukem Exp $
|
||||
# $NetBSD: dhcpd,v 1.4 2000/09/19 13:04:38 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: dhcpd
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: dhcrelay,v 1.3 2000/05/13 08:45:06 lukem Exp $
|
||||
# $NetBSD: dhcrelay,v 1.4 2000/09/19 13:04:38 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: dhcrelay
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,22 +1,24 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: dmesg,v 1.4 2000/07/26 00:11:49 lukem Exp $
|
||||
# $NetBSD: dmesg,v 1.7 2002/03/22 04:16:39 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: dmesg
|
||||
# REQUIRE: mountcritremote
|
||||
# BEFORE: DAEMON
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="dmesg"
|
||||
rcvar=$name
|
||||
dmesg_file="/var/run/dmesg.boot"
|
||||
start_cmd="do_dmesg"
|
||||
stop_cmd=":"
|
||||
|
||||
do_dmesg()
|
||||
{
|
||||
rm -f /var/run/dmesg.boot
|
||||
dmesg $dmesg_flags > /var/run/dmesg.boot
|
||||
rm -f ${dmesg_file}
|
||||
( umask 022 ; /sbin/dmesg $rc_flags > ${dmesg_file} )
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
|
27
etc/rc.d/downinterfaces
Normal file
27
etc/rc.d/downinterfaces
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: downinterfaces,v 1.2 2001/09/04 20:40:40 martin Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: downinterfaces
|
||||
# KEYWORD: shutdown
|
||||
|
||||
if [ "x$1" != "xstop" ]; then exit 0; fi
|
||||
|
||||
. /etc/rc.conf
|
||||
|
||||
tmp=`ifconfig -lu`
|
||||
iflist=""
|
||||
for int in $tmp; do
|
||||
case $int in
|
||||
pppoe*) iflist="$iflist $int"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
iflist="$iflist $force_down_interfaces"
|
||||
if [ "$iflist" = "" ] || [ "$iflist" = " " ]; then exit 0; fi
|
||||
|
||||
echo "Shutting down interfaces:$iflist"
|
||||
for int in $iflist; do
|
||||
ifconfig $int down
|
||||
done
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD$
|
||||
# $NetBSD: fsck,v 1.1 2000/08/21 23:38:07 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: fsck
|
||||
@ -27,11 +27,11 @@ fsck_start()
|
||||
{
|
||||
if [ -e /fastboot ]; then
|
||||
echo "Fast boot: skipping disk checks."
|
||||
elif [ "$autoboot" = yes ]; then
|
||||
else
|
||||
# During fsck ignore SIGQUIT
|
||||
trap : 3
|
||||
|
||||
echo "Automatic boot in progress: starting file system checks."
|
||||
echo "Starting file system checks:"
|
||||
fsck -p
|
||||
case $? in
|
||||
0)
|
||||
|
17
etc/rc.d/ifwatchd
Normal file
17
etc/rc.d/ifwatchd
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: ifwatchd
|
||||
# REQUIRE: mountcritremote network
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="ifwatchd"
|
||||
rcvar=$name
|
||||
command="/usr/sbin/${name}"
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: ipfilter,v 1.8 2000/10/01 05:58:06 lukem Exp $
|
||||
# $NetBSD: ipfilter,v 1.9 2000/10/09 06:11:38 nisimura Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: ipfilter
|
||||
@ -16,9 +16,11 @@ stop_precmd="test -f /etc/ipf.conf -o -f /etc/ipf6.conf"
|
||||
stop_cmd="ipfilter_stop"
|
||||
reload_precmd="$stop_precmd"
|
||||
reload_cmd="ipfilter_reload"
|
||||
resync_precmd="$stop_precmd"
|
||||
resync_cmd="ipfilter_resync"
|
||||
status_precmd="$stop_precmd"
|
||||
status_cmd="ipfilter_status"
|
||||
extra_commands="reload status"
|
||||
extra_commands="reload resync status"
|
||||
|
||||
ipfilter_prestart()
|
||||
{
|
||||
@ -70,6 +72,11 @@ ipfilter_reload()
|
||||
/sbin/ipf -s
|
||||
}
|
||||
|
||||
ipfilter_resync()
|
||||
{
|
||||
/sbin/ipf -y
|
||||
}
|
||||
|
||||
ipfilter_status()
|
||||
{
|
||||
/sbin/ipf -V
|
||||
|
36
etc/rc.d/ipfs
Executable file
36
etc/rc.d/ipfs
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: ipfs,v 1.3 2002/02/11 13:55:42 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: ipfs
|
||||
# REQUIRE: ipnat mountcritremote
|
||||
# KEYWORD: shutdown
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="ipfs"
|
||||
rcvar=$name
|
||||
start_cmd="ipfs_start"
|
||||
stop_cmd="ipfs_stop"
|
||||
|
||||
ipfs_start()
|
||||
{
|
||||
if [ -r /var/db/ipf/ipstate.ipf -a -r /var/db/ipf/ipnat.ipf ]; then
|
||||
/usr/sbin/ipfs -R ${rc_flags}
|
||||
rm -f /var/db/ipf/ipstate.ipf /var/db/ipf/ipnat.ipf
|
||||
fi
|
||||
}
|
||||
|
||||
ipfs_stop()
|
||||
{
|
||||
if [ ! -d /var/db/ipf ]; then
|
||||
mkdir /var/db/ipf
|
||||
chmod 700 /var/db/ipf
|
||||
chown root:wheel /var/db/ipf
|
||||
fi
|
||||
/usr/sbin/ipfs -W ${rc_flags}
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
@ -1,17 +1,18 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: ipmon,v 1.2 2000/05/13 08:45:07 lukem Exp $
|
||||
# $NetBSD: ipmon,v 1.6 2002/03/22 04:33:58 thorpej Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: ipmon
|
||||
# REQUIRE: syslogd
|
||||
# BEFORE: SERVERS
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="ipmon"
|
||||
rcvar=$name
|
||||
command="/usr/sbin/${name}"
|
||||
command_args="&"
|
||||
command_args="-D"
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: ipnat,v 1.5 2000/08/21 23:33:50 lukem Exp $
|
||||
# $NetBSD: ipnat,v 1.6 2000/09/19 13:04:38 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: ipnat
|
||||
# REQUIRE: ipfilter mountcritremote
|
||||
# BEFORE: DAEMON
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: ipsec,v 1.5 2000/07/21 01:16:07 lukem Exp $
|
||||
# $NetBSD: ipsec,v 1.6 2000/09/19 13:04:38 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: ipsec
|
||||
# REQUIRE: root beforenetlkm mountcritlocal tty
|
||||
# BEFORE: DAEMON
|
||||
|
||||
# it does not really require beforenetlkm.
|
||||
|
||||
|
@ -1,10 +1,15 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: isdnd,v 1.2 2001/01/07 17:53:36 martin Exp $
|
||||
# $NetBSD: isdnd,v 1.8 2002/03/22 04:33:58 thorpej Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: isdnd
|
||||
# REQUIRE: NETWORK syslogd mountcritremote
|
||||
# REQUIRE: NETWORKING syslogd mountcritremote
|
||||
# BEFORE: SERVERS
|
||||
#
|
||||
# Note that this means that syslogd will not be listening on
|
||||
# any isdn addresses. This is considered a feature.
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
@ -17,50 +22,3 @@ pidfile="/var/run/${name}.pid"
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
||||
if checkyesno isdnd && checkyesno isdn_autoupdown; then
|
||||
|
||||
# The isdn network interfaces could not be marked UP in the
|
||||
# ifconfig.* files, since the daemon wasn't available then.
|
||||
# If we are doing start: now it's running, so figure which
|
||||
# interfaces these applies to and UP them. If doing stop:
|
||||
# down them (for symetry, and effectively they are down).
|
||||
|
||||
case "$_arg" in
|
||||
start)
|
||||
ifflag="-d"
|
||||
ifcmd="up"
|
||||
;;
|
||||
stop)
|
||||
ifflag="-u"
|
||||
ifcmd="down"
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$isdn_interfaces" ]; then
|
||||
# the user has not specified a list of interface
|
||||
# to track isdnd - try to figure ourselfs
|
||||
tmp=`ifconfig -l $ifflag`
|
||||
for int in $tmp; do
|
||||
# Check if the interface has been configured at all
|
||||
# XXX - does this work with IPv6 ?
|
||||
if ifconfig $int | fgrep inet >/dev/null; then
|
||||
case $int in
|
||||
isp*)
|
||||
isdn_interfaces="$isdn_interfaces $int"
|
||||
;;
|
||||
ipr*)
|
||||
isdn_interfaces="$isdn_interfaces $int"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
fi
|
||||
for int in $isdn_interfaces; do
|
||||
ifconfig $int $ifcmd
|
||||
done
|
||||
fi
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: kdc,v 1.2 2000/09/19 13:04:38 lukem Exp $
|
||||
# $NetBSD: kdc,v 1.4 2002/01/31 01:26:05 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: kdc
|
||||
# REQUIRE: NETWORK
|
||||
# REQUIRE: NETWORKING
|
||||
# BEFORE: SERVERS
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,22 +1,24 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: ldconfig,v 1.2 2000/05/13 08:45:07 lukem Exp $
|
||||
# $NetBSD: ldconfig,v 1.4 2001/04/25 13:00:17 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: ldconfig
|
||||
# REQUIRE: mountall
|
||||
# BEFORE: DAEMON
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="ldconfig"
|
||||
ldconfig_command="/sbin/ldconfig"
|
||||
start_cmd="ldconfig_start"
|
||||
stop_cmd=":"
|
||||
|
||||
ldconfig_start()
|
||||
{
|
||||
if [ -f /sbin/ldconfig ]; then
|
||||
if [ -f ${ldconfig_command} ]; then
|
||||
echo "Creating a.out runtime link editor directory cache."
|
||||
ldconfig
|
||||
${ldconfig_command}
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: lkm3,v 1.4 2000/07/15 02:30:18 lukem Exp $
|
||||
# $NetBSD: lkm3,v 1.5 2000/09/19 13:04:38 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: aftermountlkm
|
||||
# REQUIRE: mountall
|
||||
# BEFORE: DAEMON
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: local,v 1.4 2000/05/13 08:45:07 lukem Exp $
|
||||
# $NetBSD: local,v 1.5 2000/08/21 23:33:06 lukem Exp $
|
||||
#
|
||||
|
||||
# REQUIRE: DAEMON
|
||||
# PROVIDE: local
|
||||
# BEFORE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
|
||||
. /etc/rc.subr
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: lpd,v 1.3 2000/05/13 08:45:07 lukem Exp $
|
||||
# $NetBSD: lpd,v 1.4 2000/09/19 13:04:38 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: lpd
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
26
etc/rc.d/mixerctl
Executable file
26
etc/rc.d/mixerctl
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: mixerctl,v 1.2 2002/06/02 19:04:10 jmcneill Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: mixerctl
|
||||
# REQUIRE: mountcritremote
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="mixerctl"
|
||||
start_cmd="mixerctl_start"
|
||||
stop_cmd=":"
|
||||
|
||||
mixerctl_start()
|
||||
{
|
||||
if [ -r /etc/mixerctl.conf ]; then
|
||||
echo "Setting mixerctl variables..."
|
||||
while read setting; do
|
||||
mixerctl -n -w $setting
|
||||
done < /etc/mixerctl.conf
|
||||
fi
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: mopd,v 1.3 2000/05/13 08:45:07 lukem Exp $
|
||||
# $NetBSD: mopd,v 1.4 2000/09/19 13:04:38 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: mopd
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: motd,v 1.5 2000/09/19 13:04:38 lukem Exp $
|
||||
# $NetBSD: motd,v 1.7 2001/04/25 23:23:37 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: motd
|
||||
# REQUIRE: mountcritremote
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
@ -23,11 +24,13 @@ motd_start()
|
||||
if [ ! -f /etc/motd ]; then
|
||||
install -c -o root -g wheel -m 664 /dev/null /etc/motd
|
||||
fi
|
||||
( umask 022
|
||||
T=/etc/_motd
|
||||
sysctl -n kern.version | while read i; do echo $i; break; done > $T
|
||||
sed '1{/^NetBSD.*/{d;};};' < /etc/motd >> $T
|
||||
cmp -s $T /etc/motd || cp $T /etc/motd
|
||||
rm -f $T
|
||||
)
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: mountcritlocal,v 1.3 2000/07/26 00:11:49 lukem Exp $
|
||||
# $NetBSD: mountcritlocal,v 1.6 2002/03/27 08:53:42 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: mountcritlocal
|
||||
@ -14,8 +14,9 @@ stop_cmd=":"
|
||||
|
||||
mountcritlocal_start()
|
||||
{
|
||||
# mount critical local filesystems
|
||||
# (as specified in $critical_filesystems_beforenet)
|
||||
# Mount critical filesystems that are `local'
|
||||
# (as specified in $critical_filesystems_local)
|
||||
# This usually includes /var.
|
||||
#
|
||||
mount_critical_filesystems local
|
||||
|
||||
|
@ -1,19 +1,26 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: mountcritremote,v 1.2 2000/05/13 08:45:07 lukem Exp $
|
||||
# $NetBSD: mountcritremote,v 1.6 2002/03/27 08:53:42 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: mountcritremote
|
||||
# REQUIRE: NETWORK root mountcritlocal
|
||||
# REQUIRE: NETWORKING root mountcritlocal
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
# mount critical remote filesystems
|
||||
# (as specified in $critical_filesystems)
|
||||
#
|
||||
name="mountcritremote"
|
||||
start_cmd="mount_critical_filesystems remote"
|
||||
start_cmd="mountcritremote_start"
|
||||
stop_cmd=":"
|
||||
|
||||
mountcritremote_start()
|
||||
{
|
||||
# Mount critical filesystems that may be `remote'.
|
||||
# (as specified in $critical_filesystems_remote)
|
||||
# This usually includes /usr.
|
||||
#
|
||||
mount_critical_filesystems remote
|
||||
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
@ -1,15 +1,15 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: mountd,v 1.6 2000/06/02 22:54:11 fvdl Exp $
|
||||
# $NetBSD: mountd,v 1.10 2001/06/16 06:13:10 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: mountd
|
||||
# REQUIRE: NETWORK mountall beforemountlkm rpcbind quota
|
||||
# REQUIRE: NETWORKING mountall beforemountlkm rpcbind quota
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="mountd"
|
||||
rcvar="nfs_server"
|
||||
rcvar=$name
|
||||
command="/usr/sbin/${name}"
|
||||
required_files="/etc/exports"
|
||||
start_precmd="mountd_precmd"
|
||||
@ -18,7 +18,7 @@ extra_commands="reload"
|
||||
mountd_precmd()
|
||||
{
|
||||
rm -f /var/db/mountdtab
|
||||
echo -n > /var/db/mountdtab
|
||||
( umask 022 ; > /var/db/mountdtab )
|
||||
return 0
|
||||
}
|
||||
|
||||
|
16
etc/rc.d/moused
Normal file
16
etc/rc.d/moused
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: $
|
||||
#
|
||||
|
||||
# PROVIDE: moused
|
||||
# REQUIRE: DAEMON
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="moused"
|
||||
rcvar=$name
|
||||
command="/usr/sbin/${name}"
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: mrouted,v 1.4 2000/05/13 08:45:07 lukem Exp $
|
||||
# $NetBSD: mrouted,v 1.5 2000/09/19 13:04:39 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: mrouted
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,12 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: named,v 1.5 2000/05/13 08:45:07 lukem Exp $
|
||||
# $NetBSD: named,v 1.10 2002/03/22 04:33:59 thorpej Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: named
|
||||
# REQUIRE: SERVERS
|
||||
# BEFORE: DAEMON
|
||||
# KEYWORD: chrootdir
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
@ -12,8 +14,47 @@ name="named"
|
||||
rcvar=$name
|
||||
command="/usr/sbin/${name}"
|
||||
pidfile="/var/run/${name}.pid"
|
||||
|
||||
start_precmd="named_precmd"
|
||||
extra_commands="reload"
|
||||
required_dirs="$named_chrootdir" # if it is set, it must exist
|
||||
|
||||
named_precmd()
|
||||
{
|
||||
if [ -z "$named_chrootdir" ]; then
|
||||
return 0;
|
||||
fi
|
||||
|
||||
# If running in a chroot cage, ensure that the appropriate files
|
||||
# exist inside the cage, as well as helper symlinks into the cage
|
||||
# from outside.
|
||||
#
|
||||
# As this is called after the is_running and required_dir checks
|
||||
# are made in run_rc_command(), we can safely assume ${named_chrootdir}
|
||||
# exists and named isn't running at this point (unless forcestart
|
||||
# is used).
|
||||
#
|
||||
|
||||
if [ ! -x "${named_chrootdir}/usr/libexec/named-xfer" -o \
|
||||
"${named_chrootdir}/usr/libexec/named-xfer" -ot \
|
||||
/usr/libexec/named-xfer ]; then
|
||||
rm -f "${named_chrootdir}/usr/libexec/named-xfer"
|
||||
cp -p /usr/libexec/named-xfer "${named_chrootdir}/usr/libexec"
|
||||
fi
|
||||
if [ ! -c "${named_chrootdir}/dev/null" ]; then
|
||||
rm -f "${named_chrootdir}/dev/null"
|
||||
( cd /dev ; /bin/pax -rw -pe null "${named_chrootdir}/dev" )
|
||||
fi
|
||||
if [ -f /etc/localtime ]; then
|
||||
cmp -s /etc/localtime "${named_chrootdir}/etc/localtime" || \
|
||||
cp -p /etc/localtime "${named_chrootdir}/etc/localtime"
|
||||
fi
|
||||
ln -fs "${named_chrootdir}/var/run/named.pid" /var/run/named.pid
|
||||
ln -fs "${named_chrootdir}/var/run/ndc" /var/run/ndc
|
||||
|
||||
# Change run_rc_commands()'s internal copy of $named_flags
|
||||
#
|
||||
rc_flags="-u named -g named -t ${named_chrootdir} $rc_flags"
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
18
etc/rc.d/ndbootd
Executable file
18
etc/rc.d/ndbootd
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: ndbootd
|
||||
# REQUIRE: DAEMON
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="ndbootd"
|
||||
rcvar=$name
|
||||
command="/usr/sbin/${name}"
|
||||
pidfile="/var/run/${name}.pid"
|
||||
required_files="/etc/ethers"
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: network,v 1.29 2001/01/11 17:56:16 itojun Exp $
|
||||
# $NetBSD: network,v 1.37 2002/04/29 12:13:14 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: network
|
||||
# REQUIRE: ipfilter ipsec mountcritlocal root tty sysctl
|
||||
# BEFORE: NETWORKING
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
@ -57,13 +58,13 @@ network_start()
|
||||
# auto-route from a newly configured interface's address to lo0
|
||||
# works correctly.
|
||||
#
|
||||
# NOTE: obscure networking problems may occur if lo0 isn't configured...
|
||||
# NOTE: obscure networking problems will occur if lo0 isn't configured.
|
||||
#
|
||||
ifconfig lo0 inet 127.0.0.1
|
||||
|
||||
# According to RFC1122, 127.0.0.0/8 should not leave the node.
|
||||
# According to RFC1122, 127.0.0.0/8 must not leave the node.
|
||||
#
|
||||
route add -inet 127.0.0.0 -netmask 0xff000000 127.0.0.1 -reject
|
||||
route -q add -inet 127.0.0.0 -netmask 0xff000000 127.0.0.1 -reject
|
||||
|
||||
# IPv6 routing setups, and host/router mode selection.
|
||||
#
|
||||
@ -73,7 +74,7 @@ network_start()
|
||||
# disallow link-local unicast dest without outgoing scope
|
||||
# identifiers.
|
||||
#
|
||||
route add -inet6 fe80:: -prefixlen 10 ::1 -reject
|
||||
route -q add -inet6 fe80:: -prefixlen 10 ::1 -reject
|
||||
|
||||
# disallow site-local unicast dest without outgoing scope
|
||||
# identifiers.
|
||||
@ -82,26 +83,26 @@ network_start()
|
||||
# boundary), you may want to comment the following one out.
|
||||
#
|
||||
if ! checkyesno ip6sitelocal; then
|
||||
route add -inet6 fec0:: -prefixlen 10 ::1 -reject
|
||||
route -q add -inet6 fec0:: -prefixlen 10 ::1 -reject
|
||||
fi
|
||||
|
||||
# disallow "internal" addresses to appear on the wire.
|
||||
#
|
||||
route add -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject
|
||||
route -q add -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject
|
||||
|
||||
# disallow packets to malicious IPv4 compatible prefix
|
||||
#
|
||||
route add -inet6 ::224.0.0.0 -prefixlen 100 ::1 -reject
|
||||
route add -inet6 ::127.0.0.0 -prefixlen 104 ::1 -reject
|
||||
route add -inet6 ::0.0.0.0 -prefixlen 104 ::1 -reject
|
||||
route add -inet6 ::255.0.0.0 -prefixlen 104 ::1 -reject
|
||||
route -q add -inet6 ::224.0.0.0 -prefixlen 100 ::1 -reject
|
||||
route -q add -inet6 ::127.0.0.0 -prefixlen 104 ::1 -reject
|
||||
route -q add -inet6 ::0.0.0.0 -prefixlen 104 ::1 -reject
|
||||
route -q add -inet6 ::255.0.0.0 -prefixlen 104 ::1 -reject
|
||||
|
||||
# disallow packets to malicious 6to4 prefix
|
||||
#
|
||||
route add -inet6 2002:e000:: -prefixlen 20 ::1 -reject
|
||||
route add -inet6 2002:7f00:: -prefixlen 24 ::1 -reject
|
||||
route add -inet6 2002:0000:: -prefixlen 24 ::1 -reject
|
||||
route add -inet6 2002:ff00:: -prefixlen 24 ::1 -reject
|
||||
route -q add -inet6 2002:e000:: -prefixlen 20 ::1 -reject
|
||||
route -q add -inet6 2002:7f00:: -prefixlen 24 ::1 -reject
|
||||
route -q add -inet6 2002:0000:: -prefixlen 24 ::1 -reject
|
||||
route -q add -inet6 2002:ff00:: -prefixlen 24 ::1 -reject
|
||||
|
||||
# Completely disallow packets to IPv4 compatible prefix.
|
||||
# This may conflict with RFC1933 under following circumstances:
|
||||
@ -117,41 +118,27 @@ network_start()
|
||||
# Due to rare use of IPv4 compatible address, and security
|
||||
# issues with it, we disable it by default.
|
||||
#
|
||||
route add -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject
|
||||
route -q add -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject
|
||||
|
||||
sysctl -w net.inet6.ip6.forwarding=0 >/dev/null
|
||||
sysctl -w net.inet6.ip6.accept_rtadv=0 >/dev/null
|
||||
|
||||
# backward compatibility
|
||||
#
|
||||
if [ -z "$ip6mode" ] && [ -n "$ip6forwarding" ]; then
|
||||
warn 'Please migrate to newer rc.conf' \
|
||||
'(use ip6mode, not ip6forwarding)'
|
||||
if checkyesno ip6forwarding; then
|
||||
ip6mode=router
|
||||
elif checkyesno rtsol; then
|
||||
ip6mode=autohost
|
||||
else
|
||||
ip6mode=host
|
||||
fi
|
||||
fi
|
||||
sysctl -qw net.inet6.ip6.forwarding=0
|
||||
sysctl -qw net.inet6.ip6.accept_rtadv=0
|
||||
|
||||
case $ip6mode in
|
||||
router)
|
||||
echo 'IPv6 mode: router'
|
||||
sysctl -w net.inet6.ip6.forwarding=1 >/dev/null
|
||||
sysctl -qw net.inet6.ip6.forwarding=1
|
||||
;;
|
||||
|
||||
autohost)
|
||||
echo 'IPv6 mode: autoconfigured host'
|
||||
sysctl -w net.inet6.ip6.accept_rtadv=1 >/dev/null
|
||||
sysctl -qw net.inet6.ip6.accept_rtadv=1
|
||||
;;
|
||||
|
||||
host)
|
||||
echo 'IPv6 mode: host'
|
||||
;;
|
||||
|
||||
*) echo 'WARNING: invalid value in ip6mode'
|
||||
*) warn "invalid \$ip6mode value "\"$ip6mode\"
|
||||
;;
|
||||
|
||||
esac
|
||||
@ -164,7 +151,7 @@ network_start()
|
||||
# we do "ifconfig xxN $ifconfig_xxN".
|
||||
# If there is no such variable, we take the contents of the file
|
||||
# /etc/ifconfig.xxN, and run "ifconfig xxN" repeatedly, using each
|
||||
# line of the file as the arguments for a seperate "ifconfig"
|
||||
# line of the file as the arguments for a separate "ifconfig"
|
||||
# invocation.
|
||||
#
|
||||
# In order to configure an interface reasonably, you at the very least
|
||||
@ -266,8 +253,6 @@ network_start()
|
||||
ifconfig $int inet alias $addr \
|
||||
netmask $net
|
||||
fi
|
||||
# Use loopback, not the wire
|
||||
route add $addr 127.0.0.1
|
||||
done
|
||||
fi
|
||||
done
|
||||
@ -292,8 +277,6 @@ network_start()
|
||||
else
|
||||
ifconfig $int inet alias $addr netmask $net
|
||||
fi
|
||||
# use loopback, not the wire
|
||||
route add $addr 127.0.0.1
|
||||
done < /etc/ifaliases
|
||||
fi
|
||||
|
||||
@ -325,6 +308,11 @@ network_start()
|
||||
fi
|
||||
fi
|
||||
|
||||
# resync ipf(4)
|
||||
if checkyesno ipfilter; then
|
||||
/sbin/ipf -y
|
||||
fi
|
||||
|
||||
# XXX this must die
|
||||
if [ -s /etc/netstart.local ]; then
|
||||
sh /etc/netstart.local start
|
||||
@ -381,6 +369,11 @@ network_stop()
|
||||
#
|
||||
route -n flush
|
||||
|
||||
# resync ipf(4)
|
||||
if checkyesno ipfilter; then
|
||||
/sbin/ipf -y
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
|
@ -1,24 +1,24 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD$
|
||||
# $NetBSD: newsyslog,v 1.4 2002/03/22 04:33:59 thorpej Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: newsyslog
|
||||
# REQUIRE: mountcritremote sysdb
|
||||
# BEFORE: syslogd
|
||||
# BEFORE: syslogd SERVERS
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="newsyslog"
|
||||
rcvar=$name
|
||||
required_files="/etc/newsyslog.conf"
|
||||
start_precmd="checkyesno newsyslog"
|
||||
start_cmd="newsyslog_start"
|
||||
stop_cmd=":"
|
||||
|
||||
newsyslog_start()
|
||||
{
|
||||
echo -n "Trimming log files:"
|
||||
/usr/bin/newsyslog -s $newsyslog_flags
|
||||
/usr/bin/newsyslog -s $rc_flags
|
||||
echo " done."
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: nfsd,v 1.2 2000/05/13 08:45:07 lukem Exp $
|
||||
# $NetBSD: nfsd,v 1.3 2000/06/02 22:54:12 fvdl Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: nfsd
|
||||
@ -11,7 +11,7 @@
|
||||
name="nfsd"
|
||||
rcvar="nfs_server"
|
||||
command="/usr/sbin/${name}"
|
||||
required_vars="rpcbind"
|
||||
required_vars="mountd rpcbind"
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
@ -1,16 +1,18 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: nfslocking,v 1.3 2000/05/13 08:45:07 lukem Exp $
|
||||
# $NetBSD: nfslocking,v 1.5 2002/03/22 04:33:59 thorpej Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: nfslocking
|
||||
# REQUIRE: nfsd
|
||||
# BEFORE: DAEMON
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
arg=$1
|
||||
|
||||
start_precmd='checkyesno nfs_server || checkyesno nfs_client'
|
||||
start_precmd='checkyesno nfs_server || checkyesno nfs_client ||
|
||||
[ -n "$rc_force" ]'
|
||||
stop_precmd=$start_precmd
|
||||
status_precmd=$start_precmd
|
||||
|
||||
|
@ -1,10 +1,12 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: ntpd,v 1.2 2000/05/13 08:45:07 lukem Exp $
|
||||
# $NetBSD: ntpd,v 1.8 2002/06/17 06:47:59 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: ntpd
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: LOGIN
|
||||
# KEYWORD: chrootdir
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
@ -12,7 +14,38 @@ name="ntpd"
|
||||
rcvar=$name
|
||||
command="/usr/sbin/${name}"
|
||||
pidfile="/var/run/${name}.pid"
|
||||
start_precmd="ntpd_precmd"
|
||||
required_files="/etc/ntp.conf"
|
||||
|
||||
ntpd_precmd()
|
||||
{
|
||||
if [ -z "$ntpd_chrootdir" ]; then
|
||||
return 0;
|
||||
fi
|
||||
|
||||
# If running in a chroot cage, ensure that the appropriate files
|
||||
# exist inside the cage, as well as helper symlinks into the cage
|
||||
# from outside.
|
||||
#
|
||||
# As this is called after the is_running and required_dir checks
|
||||
# are made in run_rc_command(), we can safely assume ${ntpd_chrootdir}
|
||||
# exists and ntpd isn't running at this point (unless forcestart
|
||||
# is used).
|
||||
#
|
||||
# Before enabling ntpd_chrootdir, ensure that:
|
||||
# - The kernel has "pseudo-device clockctl" compiled in
|
||||
# - /dev/clockctl is present
|
||||
#
|
||||
if [ ! -c "${ntpd_chrootdir}/dev/clockctl" ]; then
|
||||
rm -f "${ntpd_chrootdir}/dev/clockctl"
|
||||
( cd /dev ; /bin/pax -rw -pe clockctl "${ntpd_chrootdir}/dev" )
|
||||
fi
|
||||
ln -fs "${ntpd_chrootdir}/var/db/ntp.drift" /var/db/ntp.drift
|
||||
|
||||
# Change run_rc_commands()'s internal copy of $ntpd_flags
|
||||
#
|
||||
rc_flags="-u ntpd:ntpd -i ${ntpd_chrootdir} $rc_flags"
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
@ -1,10 +1,10 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: ntpdate,v 1.5 2000/08/21 14:48:39 abs Exp $
|
||||
# $NetBSD: ntpdate,v 1.7 2002/01/31 01:26:06 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: ntpdate
|
||||
# REQUIRE: NETWORK syslogd
|
||||
# REQUIRE: NETWORKING syslogd
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
@ -23,7 +23,7 @@ ntpdate_start()
|
||||
fi
|
||||
if [ -n "$ntpdate_hosts" ]; then
|
||||
echo "Setting date via ntp."
|
||||
ntpdate $ntpdate_flags $ntpdate_hosts
|
||||
ntpdate $rc_flags $ntpdate_hosts
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -1,24 +1,41 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: postfix,v 1.4 2000/05/13 08:45:08 lukem Exp $
|
||||
# $NetBSD: postfix,v 1.5 2000/09/19 13:04:39 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: mail
|
||||
# REQUIRE: LOGIN
|
||||
|
||||
# we could do this, but make mail start late, so that things like
|
||||
# .forward's are not processed until the system is fully operational
|
||||
## REQUIRE: DAEMON
|
||||
# we make mail start late, so that things like .forward's are not
|
||||
# processed until the system is fully operational
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="postfix"
|
||||
rcvar=$name
|
||||
required_files="/etc/${name}/main.cf"
|
||||
start_cmd="postfix start"
|
||||
stop_cmd="postfix stop"
|
||||
reload_cmd="postfix reload"
|
||||
start_precmd="postfix_precmd"
|
||||
start_cmd="${name} start"
|
||||
stop_cmd="${name} stop"
|
||||
reload_cmd="${name} reload"
|
||||
extra_commands="reload"
|
||||
spooletcdir="/var/spool/${name}/etc"
|
||||
required_dirs=$spooletcdir
|
||||
|
||||
postfix_precmd()
|
||||
{
|
||||
# As this is called after the is_running and required_dir checks
|
||||
# are made in run_rc_command(), we can safely assume ${spooletcdir}
|
||||
# exists and postfix isn't running at this point (unless forcestart
|
||||
# is used).
|
||||
#
|
||||
|
||||
for f in localtime resolv.conf services; do
|
||||
if [ -f /etc/$f ]; then
|
||||
cmp -s /etc/$f ${spooletcdir}/$f || \
|
||||
cp -p /etc/$f ${spooletcdir}/$f
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: pwcheck,v 1.2 2000/05/13 08:45:08 lukem Exp $
|
||||
# $NetBSD: pwcheck,v 1.3 2000/07/26 00:11:49 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: pwcheck
|
||||
# REQUIRE: mountcritremote syslogd
|
||||
# BEFORE: DAEMON
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: quota,v 1.1.1.1 2000/03/10 11:53:24 lukem Exp $
|
||||
# $NetBSD: quota,v 1.2 2000/05/13 08:45:08 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: quota
|
||||
# REQUIRE: mountall
|
||||
# BEFORE: DAEMON
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD$
|
||||
# $NetBSD: racoon,v 1.2 2001/04/26 03:55:16 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: ike
|
||||
# REQUIRE: kdc ppp
|
||||
# REQUIRE: isdnd kdc ppp
|
||||
# BEFORE: SERVERS
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: raidframe,v 1.4 2000/05/16 16:54:33 oster Exp $
|
||||
# $NetBSD: raidframe,v 1.5 2000/11/17 05:43:46 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: disks
|
||||
@ -13,7 +13,7 @@ stop_cmd=":"
|
||||
|
||||
raidframe_start()
|
||||
{
|
||||
# Configure raid devices.
|
||||
# Configure non-auto-configured raid devices.
|
||||
# Ensure order by globbing raid[0-9].conf before raid[0-9][0-9].conf.
|
||||
#
|
||||
for cfg in /etc/raid[0-9].conf /etc/raid[0-9][0-9].conf ; do
|
||||
@ -23,18 +23,15 @@ raidframe_start()
|
||||
raidctl -c $cfg $dev
|
||||
done
|
||||
|
||||
# Initiate parity/mirror reconstruction as needed.
|
||||
# Backgrounded, and sequentially ordered.
|
||||
#
|
||||
# XXX: this currently doesn't work for autoconfigured raid devices
|
||||
# that don't have a corresponding raidN.conf
|
||||
# Initiate parity/mirror reconstruction as needed, in the background.
|
||||
#
|
||||
(
|
||||
for cfg in /etc/raid[0-9].conf /etc/raid[0-9][0-9].conf ; do
|
||||
[ ! -f $cfg ] && continue
|
||||
dev=${cfg##*/}
|
||||
dev=${dev%%.conf}
|
||||
raidctl -P $dev
|
||||
for dev in `sysctl -n hw.disknames`; do
|
||||
case $dev in
|
||||
raid[0-9]*)
|
||||
raidctl -P $dev
|
||||
;;
|
||||
esac
|
||||
done
|
||||
) &
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: rarpd,v 1.3 2000/05/13 08:45:09 lukem Exp $
|
||||
# $NetBSD: rarpd,v 1.4 2000/09/19 13:04:39 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: rarpd
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: rbootd,v 1.4 2000/05/13 08:45:09 lukem Exp $
|
||||
# $NetBSD: rbootd,v 1.5 2000/09/19 13:04:39 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: rbootd
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: route6d,v 1.3 2000/05/13 08:45:09 lukem Exp $
|
||||
# $NetBSD: route6d,v 1.4 2000/09/19 13:04:39 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: route6d
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: routed,v 1.4 2000/05/13 08:45:09 lukem Exp $
|
||||
# $NetBSD: routed,v 1.6 2001/04/06 09:38:54 wiz Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: routed
|
||||
# REQUIRE: DAEMON gated
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: rpcbind,v 1.4 2000/07/26 00:11:49 lukem Exp $
|
||||
# $NetBSD: rpcbind,v 1.5 2000/09/19 13:04:39 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: rpcbind
|
||||
# REQUIRE: NETWORK ntpdate syslogd named ppp
|
||||
# REQUIRE: NETWORKING ntpdate syslogd named ppp
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: rtadvd,v 1.3 2000/05/13 08:45:09 lukem Exp $
|
||||
# $NetBSD: rtadvd,v 1.4 2000/09/19 13:04:39 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: rtadvd
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: rtsold,v 1.3 2000/05/13 08:45:09 lukem Exp $
|
||||
# $NetBSD: rtsold,v 1.4 2000/09/19 13:04:39 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: rtsold
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: rwho,v 1.3 2000/05/13 08:45:09 lukem Exp $
|
||||
# $NetBSD: rwho,v 1.4 2000/09/19 13:04:39 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: rwho
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: savecore,v 1.2 2000/05/13 08:45:09 lukem Exp $
|
||||
# $NetBSD: savecore,v 1.4 2002/03/22 04:16:39 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: savecore
|
||||
# REQUIRE: syslogd
|
||||
# BEFORE: SERVERS
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
@ -20,7 +21,7 @@ savecore_start()
|
||||
#
|
||||
if [ -d /var/crash/. ]; then
|
||||
echo "Checking for core dump..."
|
||||
savecore $savecore_flags /var/crash
|
||||
savecore $rc_flags /var/crash
|
||||
else
|
||||
warn "No /var/crash directory; savecore not run."
|
||||
fi
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: screenblank,v 1.3 2000/05/13 08:45:09 lukem Exp $
|
||||
# $NetBSD: screenblank,v 1.4 2000/09/19 13:04:39 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: screenblank
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: securelevel,v 1.1 2000/08/21 23:31:24 lukem Exp $
|
||||
# $NetBSD: securelevel,v 1.3 2002/03/01 17:58:00 mrg Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: securelevel
|
||||
# REQUIRE: aftermountlkm ipnat mountd
|
||||
# BEFORE: DAEMON
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
@ -14,15 +15,21 @@ stop_cmd=":"
|
||||
|
||||
securelevel_start()
|
||||
{
|
||||
# if $securelevel is set, change it here, else if it is 0,
|
||||
# change it to 1 here, before we start daemons or login services.
|
||||
# if $securelevel is set higher, change it here, else if
|
||||
# it is 0, change it to 1 here, before we start daemons
|
||||
# or login services.
|
||||
#
|
||||
if [ -n "$securelevel" ]; then
|
||||
echo -n "Setting securelevel: "
|
||||
sysctl -w kern.securelevel=$securelevel
|
||||
osecurelevel=`sysctl -n kern.securelevel`
|
||||
if [ -n "$securelevel" -a "$securelevel" != "$osecurelevel" ]; then
|
||||
if [ "$securelevel" -lt "$osecurelevel" ]; then
|
||||
echo "Can't lower securelevel."
|
||||
exit 1
|
||||
else
|
||||
echo -n "Setting securelevel: "
|
||||
sysctl -w kern.securelevel=$securelevel
|
||||
fi
|
||||
else
|
||||
securelevel=`sysctl -n kern.securelevel`
|
||||
if [ x"$securelevel" = x0 ]; then
|
||||
if [ "$osecurelevel" = 0 ]; then
|
||||
echo -n "Setting securelevel: "
|
||||
sysctl -w kern.securelevel=1
|
||||
fi
|
||||
|
@ -1,14 +1,12 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: sendmail,v 1.12 2000/10/09 06:11:38 nisimura Exp $
|
||||
# $NetBSD: sendmail,v 1.13 2000/12/18 07:56:41 jmc Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: mail
|
||||
# REQUIRE: LOGIN
|
||||
|
||||
# we could do this, but make mail start late, so that things like
|
||||
# .forward's are not processed until the system is fully operational
|
||||
## REQUIRE: DAEMON
|
||||
# we make mail start late, so that things like .forward's are not
|
||||
# processed until the system is fully operational
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
@ -47,8 +45,8 @@ sendmail_precmd()
|
||||
|
||||
# check couple of common db files, too
|
||||
for f in genericstable virtusertable domaintable mailertable; do
|
||||
if [ -r "/etc/mail/$f" ] && [ "/etc/mail/$f" -nt "/etc/mail/$f.db" ];
|
||||
then
|
||||
if [ -r "/etc/mail/$f" -a \
|
||||
"/etc/mail/$f" -nt "/etc/mail/$f.db" ]; then
|
||||
echo \
|
||||
"${name}: /etc/mail/$f newer than /etc/mail/$f.db, regenerating"
|
||||
/usr/sbin/makemap hash /etc/mail/$f < /etc/mail/$f
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: sshd,v 1.7 2000/08/10 22:49:43 lukem Exp $
|
||||
# $NetBSD: sshd,v 1.17 2002/04/29 05:55:06 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: sshd
|
||||
@ -12,32 +12,46 @@ name="sshd"
|
||||
rcvar=$name
|
||||
command="/usr/sbin/${name}"
|
||||
pidfile="/var/run/${name}.pid"
|
||||
required_files="/etc/${name}.conf"
|
||||
required_files="/etc/ssh/sshd_config"
|
||||
extra_commands="keygen reload"
|
||||
|
||||
sshd_keygen()
|
||||
{
|
||||
if [ -f /etc/ssh_host_key ]; then
|
||||
echo "You already have an RSA host key in /etc/ssh_host_key"
|
||||
echo "Skipping RSA Key Generation"
|
||||
(
|
||||
umask 022
|
||||
if [ -f /etc/ssh/ssh_host_key ]; then
|
||||
echo "You already have an RSA host key" \
|
||||
"in /etc/ssh/ssh_host_key"
|
||||
echo "Skipping protocol version 1 RSA Key Generation"
|
||||
else
|
||||
umask 022
|
||||
/usr/bin/ssh-keygen -b 1024 -f /etc/ssh_host_key -N ''
|
||||
/usr/bin/ssh-keygen -t rsa1 -b 1024 \
|
||||
-f /etc/ssh/ssh_host_key -N ''
|
||||
fi
|
||||
|
||||
if [ -f /etc/ssh_host_dsa_key ]; then
|
||||
echo "You already have a DSA host key in /etc/ssh_host_dsa_key"
|
||||
echo "Skipping DSA Key Generation"
|
||||
if [ -f /etc/ssh/ssh_host_dsa_key ]; then
|
||||
echo "You already have a DSA host key" \
|
||||
"in /etc/ssh/ssh_host_dsa_key"
|
||||
echo "Skipping protocol version 2 DSA Key Generation"
|
||||
else
|
||||
umask 022
|
||||
/usr/bin/ssh-keygen -d -f /etc/ssh_host_dsa_key -N ''
|
||||
/usr/bin/ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
|
||||
fi
|
||||
|
||||
if [ -f /etc/ssh/ssh_host_rsa_key ]; then
|
||||
echo "You already have a RSA host key" \
|
||||
"in /etc/ssh/ssh_host_rsa_key"
|
||||
echo "Skipping protocol version 2 RSA Key Generation"
|
||||
else
|
||||
/usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
|
||||
fi
|
||||
)
|
||||
}
|
||||
|
||||
sshd_precmd()
|
||||
{
|
||||
if [ ! -f /etc/ssh_host_key -o ! -f /etc/ssh_host_dsa_key ]; then
|
||||
/etc/rc.d/sshd keygen
|
||||
if [ ! -f /etc/ssh/ssh_host_key -o \
|
||||
! -f /etc/ssh/ssh_host_dsa_key -o \
|
||||
! -f /etc/ssh/ssh_host_rsa_key ]; then
|
||||
run_rc_command keygen
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -1,23 +1,37 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: swap1,v 1.4 2000/05/13 08:45:09 lukem Exp $
|
||||
# $NetBSD: swap1,v 1.7 2002/03/21 23:08:36 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: localswap
|
||||
# REQUIRE: disks
|
||||
# KEYWORD: shutdown
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="swap1"
|
||||
start_cmd="swap1_start"
|
||||
stop_cmd="swap1_stop"
|
||||
|
||||
# Add all block-type swap devices; these might be necessary
|
||||
# during disk checks.
|
||||
#
|
||||
start_cmd='swapctl -A -t blk'
|
||||
swap1_start()
|
||||
{
|
||||
if ! checkyesno no_swap; then
|
||||
swapctl -A -t blk
|
||||
fi
|
||||
}
|
||||
|
||||
# Remove all block-type swap devices
|
||||
#
|
||||
stop_cmd="swapctl -U -t blk"
|
||||
swap1_stop()
|
||||
{
|
||||
if checkyesno swapoff || [ -n "$rc_force" ]; then
|
||||
echo "Removing block-type swap devices"
|
||||
swapctl -U -t blk
|
||||
fi
|
||||
}
|
||||
|
||||
load_rc_config swap
|
||||
run_rc_command "$1"
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: swap2,v 1.4 2000/07/17 12:27:04 lukem Exp $
|
||||
# $NetBSD: swap2,v 1.5 2000/08/21 23:35:41 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: nonlocalswap
|
||||
# REQUIRE: mountcritremote
|
||||
# BEFORE: DAEMON
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: sysctl,v 1.8 2000/06/13 16:29:55 itojun Exp $
|
||||
# $NetBSD: sysctl,v 1.11 2002/03/27 08:03:08 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: sysctl
|
||||
# REQUIRE: root ipfilter ipsec
|
||||
# BEFORE: DAEMON
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
@ -14,22 +15,6 @@ stop_cmd=":"
|
||||
|
||||
sysctl_start()
|
||||
{
|
||||
if [ -n "$defcorename" ]; then
|
||||
cat <<__EOF__
|
||||
*** WARNING: /etc/rc.conf \$defcorename setting is obsolete. Please
|
||||
*** set kern.defcorename in /etc/sysctl.conf
|
||||
__EOF__
|
||||
sysctl -w kern.defcorename=$defcorename
|
||||
fi
|
||||
|
||||
if [ -n "$nfsiod_flags" ]; then
|
||||
cat <<__EOF__
|
||||
*** WARNING: /etc/rc.conf \$nfsiod_flags setting is obsolete. Please
|
||||
*** remove it. If it was set to other than the default of "-n 4", then
|
||||
*** set vfs.nfs.iothreads in /etc/sysctl.conf
|
||||
__EOF__
|
||||
fi
|
||||
|
||||
if [ -r /etc/sysctl.conf ]; then
|
||||
echo "Setting sysctl variables:"
|
||||
sysctl -f /etc/sysctl.conf
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: sysdb,v 1.6 2000/10/09 05:02:14 nisimura Exp $
|
||||
# $NetBSD: sysdb,v 1.8 2001/04/16 01:38:15 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: sysdb
|
||||
# REQUIRE: mountcritremote
|
||||
# BEFORE: DAEMON
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
@ -20,7 +21,7 @@ sysdb_start()
|
||||
#
|
||||
echo "Building databases..."
|
||||
booted_kernel=`sysctl -n machdep.booted_kernel 2>/dev/null`
|
||||
kvm_mkdb ${booted_kernel:-/netbsd}
|
||||
kvm_mkdb "${booted_kernel:-/netbsd}"
|
||||
dev_mkdb
|
||||
|
||||
# Re-create /var/run/utmp, which is deleted by mountcritlocal
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: syslogd,v 1.6 2000/07/29 21:50:20 veego Exp $
|
||||
# $NetBSD: syslogd,v 1.12 2002/03/22 04:34:00 thorpej Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: syslogd
|
||||
# REQUIRE: mountcritremote sysdb wscons
|
||||
# BEFORE: SERVERS
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
@ -16,6 +17,8 @@ required_files="/etc/syslog.conf"
|
||||
start_precmd="syslogd_precmd"
|
||||
extra_commands="reload"
|
||||
|
||||
_sockfile="/var/run/syslogd.sockets"
|
||||
|
||||
syslogd_precmd()
|
||||
{
|
||||
# Transitional symlink for old binaries
|
||||
@ -23,7 +26,32 @@ syslogd_precmd()
|
||||
if [ ! -h /dev/log ]; then
|
||||
ln -sf /var/run/log /dev/log
|
||||
fi
|
||||
rm -f /var/run/log
|
||||
|
||||
# Create default list of syslog sockets to watch
|
||||
#
|
||||
( umask 022 ; > $_sockfile )
|
||||
|
||||
# Find /etc/rc.d scripts with "chrootdir" rcorder(8) keyword,
|
||||
# and if $${app}_chrootdir is a directory, add appropriate
|
||||
# syslog socket to list of sockets to watch.
|
||||
#
|
||||
for _lr in $(rcorder -k chrootdir /etc/rc.d/*); do
|
||||
_l=${_lr##*/}
|
||||
eval _ldir=\$${_l}_chrootdir
|
||||
if checkyesno $_l && [ -n "$_ldir" ]; then
|
||||
echo "${_ldir}/var/run/log" >> $_sockfile
|
||||
fi
|
||||
done
|
||||
|
||||
# If other sockets have been provided, change run_rc_command()'s
|
||||
# internal copy of $syslogd_flags to force use of specific
|
||||
# syslogd sockets.
|
||||
#
|
||||
if [ -s $_sockfile ]; then
|
||||
echo "/var/run/log" >> $_sockfile
|
||||
rc_flags="-P $_sockfile $rc_flags"
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: timed,v 1.3 2000/05/13 08:45:09 lukem Exp $
|
||||
# $NetBSD: timed,v 1.4 2000/09/19 13:04:39 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: timed
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: ttys,v 1.1.1.1 2000/03/10 11:53:24 lukem Exp $
|
||||
# $NetBSD: ttys,v 1.3 2001/04/25 12:59:16 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: tty
|
||||
@ -23,9 +23,15 @@ ttyflags_start()
|
||||
# setup ptys
|
||||
#
|
||||
# XXX: there may be more ptys than this; maybe use
|
||||
# sysctl to find out how many?
|
||||
# sysctl kern.maxptys to find out how many?
|
||||
#
|
||||
chmod 666 /dev/tty[pqrs]*
|
||||
chmod 666 /dev/tty[p-uw-zP-T][0-9a-zA-Z]
|
||||
|
||||
# only change ttyv* if ttyv0 is not reserved by a console.
|
||||
#
|
||||
if [ -c /dev/ttyv1 ]; then
|
||||
chmod 666 /dev/ttyv[0-9a-zA-Z]
|
||||
fi
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
|
@ -1,29 +1,20 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: virecover,v 1.3 2000/07/26 00:11:49 lukem Exp $
|
||||
# $NetBSD: virecover,v 1.5 2001/04/11 21:02:44 aymeric Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: virecover
|
||||
# REQUIRE: mountcritremote
|
||||
# BEFORE: DAEMON
|
||||
#
|
||||
# XXX: should require `mail'!
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="virecover"
|
||||
start_cmd="virecover_start"
|
||||
command="/usr/libexec/${name}"
|
||||
stop_cmd=":"
|
||||
|
||||
virecover_start()
|
||||
{
|
||||
recover=`find /var/tmp/vi.recover -name 'recover.*' -type f -print`
|
||||
if [ -n "$recover" ]; then
|
||||
echo "Preserving editor files."
|
||||
for i in $recover; do
|
||||
sendmail -t < $i
|
||||
done
|
||||
fi
|
||||
}
|
||||
reload_cmd=":"
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: wscons,v 1.5 2000/08/21 23:02:25 lukem Exp $
|
||||
# $NetBSD: wscons,v 1.8 2002/03/22 04:34:00 thorpej Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: wscons
|
||||
# REQUIRE: mountcritremote
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
@ -17,6 +18,7 @@ wscons_start()
|
||||
{
|
||||
wscfg=/usr/sbin/wsconscfg
|
||||
wsfld=/usr/sbin/wsfontload
|
||||
wsctl=/sbin/wsconsctl
|
||||
config=/etc/wscons.conf
|
||||
usage="Usage: wsconfig [-n] [-f configfile] [-font fontpgm] [-screen screenpgm]"
|
||||
DOIT=
|
||||
@ -55,6 +57,7 @@ wscons_start()
|
||||
\#*|"")
|
||||
continue
|
||||
;;
|
||||
|
||||
font)
|
||||
name=$arg1
|
||||
width=$arg2
|
||||
@ -87,6 +90,7 @@ wscons_start()
|
||||
cmd="$cmd -N $name $file"
|
||||
eval $DOIT $cmd
|
||||
;;
|
||||
|
||||
screen)
|
||||
idx=$arg1
|
||||
scr=$arg2
|
||||
@ -110,6 +114,7 @@ wscons_start()
|
||||
cmd="$cmd $idx"
|
||||
eval $DOIT $cmd
|
||||
;;
|
||||
|
||||
keyboard)
|
||||
kbd=$arg1
|
||||
cmd=$wscfg
|
||||
@ -123,10 +128,39 @@ wscons_start()
|
||||
esac
|
||||
eval $DOIT $cmd
|
||||
;;
|
||||
|
||||
encoding)
|
||||
map=$arg1
|
||||
cmd="$wsctl -w \"encoding=$map\""
|
||||
eval $DOIT $cmd
|
||||
;;
|
||||
|
||||
mapfile)
|
||||
mapfile=$arg1
|
||||
( while read entry; do
|
||||
case "$entry" in
|
||||
\#*|"")
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
cmd="$wsctl -w \"map+=$entry\""
|
||||
cmd="$cmd >/dev/null"
|
||||
eval $DOIT $cmd
|
||||
;;
|
||||
esac
|
||||
done ) < $mapfile
|
||||
;;
|
||||
|
||||
mux)
|
||||
cmd="$wscfg -m $arg1"
|
||||
eval $DOIT $cmd
|
||||
;;
|
||||
|
||||
setvar)
|
||||
cmd="$wsctl -w $arg1"
|
||||
eval $DOIT $cmd
|
||||
;;
|
||||
|
||||
esac
|
||||
done ) < $config
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: xfs,v 1.4 2000/09/19 13:04:39 lukem Exp $
|
||||
# $NetBSD: xfs,v 1.5 2000/11/09 00:05:31 jdolecek Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: xfs
|
||||
# REQUIRE: mountall cleartmp
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: ypbind,v 1.3 2000/05/13 08:45:10 lukem Exp $
|
||||
# $NetBSD: ypbind,v 1.4 2000/09/19 13:04:39 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: ypbind
|
||||
# REQUIRE: ypserv
|
||||
# BEFORE: DAEMON
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: yppasswdd,v 1.4 2000/06/02 22:54:13 fvdl Exp $
|
||||
# $NetBSD: yppasswdd,v 1.5 2000/09/19 13:04:39 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: yppasswdd
|
||||
# REQUIRE: ypserv ypbind
|
||||
# BEFORE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user