aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/mail/mailer.conf8
-rw-r--r--etc/mailer.conf8
-rw-r--r--etc/rc43
-rwxr-xr-xetc/rc.d/DAEMON10
-rwxr-xr-xetc/rc.d/LOGIN13
-rwxr-xr-xetc/rc.d/Makefile23
-rwxr-xr-xetc/rc.d/NETWORK10
-rw-r--r--etc/rc.d/NETWORKING9
-rwxr-xr-xetc/rc.d/SERVERS10
-rwxr-xr-xetc/rc.d/accounting36
-rw-r--r--etc/rc.d/altqd21
-rwxr-xr-xetc/rc.d/amd22
-rwxr-xr-xetc/rc.d/apmd17
-rwxr-xr-xetc/rc.d/bootconf.sh81
-rwxr-xr-xetc/rc.d/bootparams18
-rwxr-xr-xetc/rc.d/ccd23
-rwxr-xr-xetc/rc.d/cleartmp31
-rwxr-xr-xetc/rc.d/cron18
-rwxr-xr-xetc/rc.d/dhclient22
-rwxr-xr-xetc/rc.d/dhcpd19
-rwxr-xr-xetc/rc.d/dhcrelay18
-rwxr-xr-xetc/rc.d/dmesg25
-rw-r--r--etc/rc.d/downinterfaces27
-rwxr-xr-xetc/rc.d/fsck68
-rwxr-xr-xetc/rc.d/gated18
-rw-r--r--etc/rc.d/ifwatchd17
-rwxr-xr-xetc/rc.d/inetd20
-rwxr-xr-xetc/rc.d/ipfilter86
-rwxr-xr-xetc/rc.d/ipfs36
-rwxr-xr-xetc/rc.d/ipmon18
-rwxr-xr-xetc/rc.d/ipnat34
-rwxr-xr-xetc/rc.d/ipsec68
-rw-r--r--etc/rc.d/isdnd24
-rwxr-xr-xetc/rc.d/kdc19
-rwxr-xr-xetc/rc.d/ldconfig26
-rwxr-xr-xetc/rc.d/lkm139
-rwxr-xr-xetc/rc.d/lkm237
-rwxr-xr-xetc/rc.d/lkm328
-rwxr-xr-xetc/rc.d/local32
-rwxr-xr-xetc/rc.d/lpd19
-rwxr-xr-xetc/rc.d/mixerctl26
-rwxr-xr-xetc/rc.d/mopd17
-rwxr-xr-xetc/rc.d/motd37
-rwxr-xr-xetc/rc.d/mountall16
-rwxr-xr-xetc/rc.d/mountcritlocal31
-rwxr-xr-xetc/rc.d/mountcritremote26
-rwxr-xr-xetc/rc.d/mountd26
-rw-r--r--etc/rc.d/moused16
-rwxr-xr-xetc/rc.d/mrouted20
-rwxr-xr-xetc/rc.d/named60
-rwxr-xr-xetc/rc.d/ndbootd18
-rwxr-xr-xetc/rc.d/network380
-rwxr-xr-xetc/rc.d/newsyslog26
-rwxr-xr-xetc/rc.d/nfsd17
-rwxr-xr-xetc/rc.d/nfslocking29
-rwxr-xr-xetc/rc.d/ntpd51
-rwxr-xr-xetc/rc.d/ntpdate31
-rw-r--r--etc/rc.d/poffd17
-rwxr-xr-xetc/rc.d/postfix41
-rwxr-xr-xetc/rc.d/pwcheck27
-rwxr-xr-xetc/rc.d/quota25
-rwxr-xr-xetc/rc.d/racoon19
-rwxr-xr-xetc/rc.d/raidframe40
-rwxr-xr-xetc/rc.d/rarpd19
-rwxr-xr-xetc/rc.d/rbootd20
-rwxr-xr-xetc/rc.d/root23
-rwxr-xr-xetc/rc.d/route6d17
-rwxr-xr-xetc/rc.d/routed26
-rwxr-xr-xetc/rc.d/rpcbind17
-rwxr-xr-xetc/rc.d/rtadvd27
-rwxr-xr-xetc/rc.d/rtsold26
-rwxr-xr-xetc/rc.d/rwho17
-rwxr-xr-xetc/rc.d/savecore31
-rwxr-xr-xetc/rc.d/screenblank18
-rwxr-xr-xetc/rc.d/securelevel40
-rwxr-xr-xetc/rc.d/sendmail58
-rwxr-xr-xetc/rc.d/sshd62
-rwxr-xr-xetc/rc.d/swap137
-rwxr-xr-xetc/rc.d/swap236
-rw-r--r--etc/rc.d/sysctl25
-rwxr-xr-xetc/rc.d/sysdb35
-rwxr-xr-xetc/rc.d/syslogd59
-rwxr-xr-xetc/rc.d/timed17
-rwxr-xr-xetc/rc.d/ttys38
-rwxr-xr-xetc/rc.d/virecover20
-rwxr-xr-xetc/rc.d/wscons169
-rwxr-xr-xetc/rc.d/xdm20
-rwxr-xr-xetc/rc.d/xfs20
-rwxr-xr-xetc/rc.d/ypbind27
-rwxr-xr-xetc/rc.d/yppasswdd28
-rwxr-xr-xetc/rc.d/ypserv32
-rw-r--r--etc/rc.shutdown38
-rw-r--r--etc/rc.subr586
93 files changed, 0 insertions, 3685 deletions
diff --git a/etc/mail/mailer.conf b/etc/mail/mailer.conf
deleted file mode 100644
index 6d2b3c5ec3c6..000000000000
--- a/etc/mail/mailer.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-# $NetBSD: mailer.conf,v 1.2 1999/02/05 18:11:23 perry Exp $
-#
-# Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail
-#
-sendmail /usr/libexec/sendmail/sendmail
-send-mail /usr/libexec/sendmail/sendmail
-mailq /usr/libexec/sendmail/sendmail
-newaliases /usr/libexec/sendmail/sendmail
diff --git a/etc/mailer.conf b/etc/mailer.conf
deleted file mode 100644
index 6d2b3c5ec3c6..000000000000
--- a/etc/mailer.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-# $NetBSD: mailer.conf,v 1.2 1999/02/05 18:11:23 perry Exp $
-#
-# Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail
-#
-sendmail /usr/libexec/sendmail/sendmail
-send-mail /usr/libexec/sendmail/sendmail
-mailq /usr/libexec/sendmail/sendmail
-newaliases /usr/libexec/sendmail/sendmail
diff --git a/etc/rc b/etc/rc
deleted file mode 100644
index 19f62e74d9df..000000000000
--- a/etc/rc
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: rc,v 1.152 2000/04/22 03:01:22 lukem Exp $
-#
-# rc.sh --
-# Run the scripts in /etc/rc.d with rcorder.
-
-# System startup script run by init on autoboot or after single-user.
-# Output and error are redirected to console by init, and the console
-# is the controlling terminal.
-
-export HOME=/
-export PATH=/sbin:/bin:/usr/sbin:/usr/bin
-
-. /etc/rc.subr
-. /etc/rc.conf
-
-if ! checkyesno rc_configured; then
- echo "/etc/rc.conf is not configured. Multiuser boot aborted."
- exit 1
-fi
-
-if [ "$1" = autoboot ]; then
- autoboot=yes
- _rc_fast_run=yes # run_rc_command(): do fast booting
-fi
-
-stty status '^T'
-
-# Set shell to ignore SIGINT (2), but not children;
-# shell catches SIGQUIT (3) and returns to single user.
-#
-trap : 2
-trap "echo 'Boot interrupted.'; exit 1" 3
-
-files=`rcorder -s nostart /etc/rc.d/*`
-
-for i in $files; do
- run_rc_script $i start
-done
-
-date
-exit 0
diff --git a/etc/rc.d/DAEMON b/etc/rc.d/DAEMON
deleted file mode 100755
index 917dd1c5f0b7..000000000000
--- a/etc/rc.d/DAEMON
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DAEMON,v 1.7 2002/01/31 01:26:05 lukem Exp $
-#
-
-# PROVIDE: DAEMON
-# REQUIRE: NETWORKING SERVERS
-
-# This is a dummy dependency, to ensure that general purpose daemons
-# are run _after_ the above are.
diff --git a/etc/rc.d/LOGIN b/etc/rc.d/LOGIN
deleted file mode 100755
index 416aec2126eb..000000000000
--- a/etc/rc.d/LOGIN
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: LOGIN,v 1.6 2001/04/19 16:00:29 lukem Exp $
-#
-
-# PROVIDE: LOGIN
-# REQUIRE: DAEMON
-
-# 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
-# operational.
diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile
deleted file mode 100755
index 61d6e05978ec..000000000000
--- a/etc/rc.d/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-# $NetBSD: Makefile,v 1.28 2002/04/24 08:18:47 lukem Exp $
-
-.include <bsd.own.mk>
-
-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}
-
-.include <bsd.prog.mk>
diff --git a/etc/rc.d/NETWORK b/etc/rc.d/NETWORK
deleted file mode 100755
index 92040d24bdf2..000000000000
--- a/etc/rc.d/NETWORK
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD$
-#
-
-# PROVIDE: NETWORK
-# REQUIRE: network dhclient
-
-# This is a dummy dependancy, for services which require networking
-# to be operational before starting.
diff --git a/etc/rc.d/NETWORKING b/etc/rc.d/NETWORKING
deleted file mode 100644
index 1bc62a4946a6..000000000000
--- a/etc/rc.d/NETWORKING
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/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.
diff --git a/etc/rc.d/SERVERS b/etc/rc.d/SERVERS
deleted file mode 100755
index e3c7a24047d4..000000000000
--- a/etc/rc.d/SERVERS
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: SERVERS,v 1.8 2001/04/26 03:56:20 lukem Exp $
-#
-
-# PROVIDE: SERVERS
-# REQUIRE: mountcritremote
-
-# This is a dummy dependency, for early-start servers relying on
-# some basic configuration.
diff --git a/etc/rc.d/accounting b/etc/rc.d/accounting
deleted file mode 100755
index e05c58bc0925..000000000000
--- a/etc/rc.d/accounting
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-#
-# $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 ${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."
- ${accounting_command}
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/altqd b/etc/rc.d/altqd
deleted file mode 100644
index 85252d5d2460..000000000000
--- a/etc/rc.d/altqd
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/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"
diff --git a/etc/rc.d/amd b/etc/rc.d/amd
deleted file mode 100755
index 1f1598b39e77..000000000000
--- a/etc/rc.d/amd
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: amd,v 1.9 2002/03/22 04:33:58 thorpej Exp $
-#
-
-# PROVIDE: amd
-# REQUIRE: rpcbind mountall ypbind
-# BEFORE: DAEMON
-
-. /etc/rc.subr
-
-name="amd"
-rcvar=$name
-command="/usr/sbin/${name}"
-load_rc_config $name
-
-command_args='-p -a '$amd_dir' -F /etc/amd.conf >/var/run/amd.pid'
-required_files="/etc/amd.conf"
-required_dirs="$amd_dir"
-required_vars="rpcbind"
-
-run_rc_command "$1"
diff --git a/etc/rc.d/apmd b/etc/rc.d/apmd
deleted file mode 100755
index 2448b2880527..000000000000
--- a/etc/rc.d/apmd
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: apmd,v 1.4 2000/09/19 13:04:38 lukem Exp $
-#
-
-# PROVIDE: apmd
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="apmd"
-rcvar=$name
-command="/usr/sbin/${name}"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/bootconf.sh b/etc/rc.d/bootconf.sh
deleted file mode 100755
index a15b5a00bb7a..000000000000
--- a/etc/rc.d/bootconf.sh
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: bootconf.sh,v 1.4 2002/03/24 15:08:58 lukem Exp $
-#
-
-# PROVIDE: bootconf
-# REQUIRE: mountcritlocal
-
-bootconf_start()
-{
- # Refer to newbtconf(8) for more information
- #
-
- if [ ! -e /etc/etc.current ]; then
- return 0
- fi
- if [ -h /etc/etc.default ]; then
- def=`ls -ld /etc/etc.default 2>&1`
- default="${def##*-> etc.}"
- 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
- name="${i##/etc/etc.}"
- case $name in
- current|default|\*)
- continue
- ;;
- *)
- if [ "$name" = "$default" ]; then
- echo -n "${spc}[${name}]"
- else
- echo -n "${spc}${name}"
- fi
- spc=" "
- ;;
- esac
- done
- echo
- master=$$
- _DUMMY=/etc/passwd
- conf=${_DUMMY}
- while [ ! -d /etc/etc.$conf/. ]; do
- 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 : ALRM
- if [ -z $conf ] ; then
- conf=$default
- fi
- if [ ! -d /etc/etc.$conf/. ]; then
- conf=${_DUMMY}
- fi
- done
-
- 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
-}
-
-case "$1" in
-*start)
- bootconf_start
- ;;
-esac
diff --git a/etc/rc.d/bootparams b/etc/rc.d/bootparams
deleted file mode 100755
index d9b75e9a6a2f..000000000000
--- a/etc/rc.d/bootparams
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: bootparams,v 1.5 2000/09/19 13:04:38 lukem Exp $
-#
-
-# PROVIDE: bootparams
-# REQUIRE: rpcbind DAEMON
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="bootparamd"
-rcvar=$name
-command="/usr/sbin/rpc.${name}"
-required_files="/etc/bootparams"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/ccd b/etc/rc.d/ccd
deleted file mode 100755
index 57c6406e29ed..000000000000
--- a/etc/rc.d/ccd
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: ccd,v 1.2 2000/04/26 05:13:51 thorpej Exp $
-#
-
-# PROVIDE: disks
-
-. /etc/rc.subr
-
-name="ccd"
-start_cmd="ccd_start"
-stop_cmd=":"
-
-ccd_start()
-{
- if [ -f /etc/ccd.conf ]; then
- echo "Configuring CCD devices."
- ccdconfig -C
- fi
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/cleartmp b/etc/rc.d/cleartmp
deleted file mode 100755
index 6feeccc156d1..000000000000
--- a/etc/rc.d/cleartmp
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: cleartmp,v 1.3 2000/09/19 13:04:38 lukem Exp $
-#
-
-# PROVIDE: cleartmp
-# REQUIRE: mountall
-# BEFORE: DAEMON
-
-. /etc/rc.subr
-
-name="cleartmp"
-rcvar="clear_tmp"
-start_cmd="cleartmp_start"
-stop_cmd=":"
-
-cleartmp_start()
-{
- echo "Clearing /tmp."
- #
- # Prune quickly with one rm, then use find to clean up
- # /tmp/[lq]* (this is not needed with mfs /tmp, but
- # doesn't hurt anything).
- #
- (cd /tmp && rm -rf [a-km-pr-zA-Z]* &&
- find -x . ! -name . ! -name lost+found ! -name quota.user \
- ! -name quota.group -exec rm -rf -- {} \; -type d -prune)
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/cron b/etc/rc.d/cron
deleted file mode 100755
index 936344336041..000000000000
--- a/etc/rc.d/cron
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: cron,v 1.4 2000/07/17 15:24:48 lukem Exp $
-#
-
-# PROVIDE: cron
-# REQUIRE: LOGIN
-# KEYWORD: shutdown
-
-. /etc/rc.subr
-
-name="cron"
-rcvar=$name
-command="/usr/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/dhclient b/etc/rc.d/dhclient
deleted file mode 100755
index 6bd2f8f4c78f..000000000000
--- a/etc/rc.d/dhclient
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-#
-# $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.
-#
-
-. /etc/rc.subr
-
-name="dhclient"
-rcvar=$name
-command="/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/dhcpd b/etc/rc.d/dhcpd
deleted file mode 100755
index c5547a36a5fa..000000000000
--- a/etc/rc.d/dhcpd
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: dhcpd,v 1.4 2000/09/19 13:04:38 lukem Exp $
-#
-
-# PROVIDE: dhcpd
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="dhcpd"
-rcvar=$name
-command="/usr/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-required_files="/etc/${name}.conf /var/db/${name}.leases"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/dhcrelay b/etc/rc.d/dhcrelay
deleted file mode 100755
index 014a87b1d492..000000000000
--- a/etc/rc.d/dhcrelay
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: dhcrelay,v 1.4 2000/09/19 13:04:38 lukem Exp $
-#
-
-# PROVIDE: dhcrelay
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="dhcrelay"
-rcvar=$name
-command="/usr/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/dmesg b/etc/rc.d/dmesg
deleted file mode 100755
index a66162c3f466..000000000000
--- a/etc/rc.d/dmesg
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-#
-# $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 ${dmesg_file}
- ( umask 022 ; /sbin/dmesg $rc_flags > ${dmesg_file} )
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/downinterfaces b/etc/rc.d/downinterfaces
deleted file mode 100644
index 6a5c9433b22a..000000000000
--- a/etc/rc.d/downinterfaces
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/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
diff --git a/etc/rc.d/fsck b/etc/rc.d/fsck
deleted file mode 100755
index 31f1e982a19f..000000000000
--- a/etc/rc.d/fsck
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: fsck,v 1.1 2000/08/21 23:38:07 lukem Exp $
-#
-
-# PROVIDE: fsck
-# REQUIRE: localswap
-
-. /etc/rc.subr
-
-name="fsck"
-start_cmd="fsck_start"
-stop_cmd=":"
-
-stop_boot()
-{
- # Terminate the process (which may include the parent /etc/rc)
- # if booting directly to multiuser mode.
- #
- if [ "$autoboot" = yes ]; then
- kill -TERM $$
- fi
- exit 1
-}
-
-fsck_start()
-{
- if [ -e /fastboot ]; then
- echo "Fast boot: skipping disk checks."
- else
- # During fsck ignore SIGQUIT
- trap : 3
-
- echo "Starting file system checks:"
- fsck -p
- case $? in
- 0)
- ;;
- 2)
- stop_boot
- ;;
- 4)
- echo "Rebooting..."
- reboot
- echo "Reboot failed; help!"
- stop_boot
- ;;
- 8)
- echo "Automatic file system check failed; help!"
- stop_boot
- ;;
- 12)
- echo "Boot interrupted."
- stop_boot
- ;;
- 130)
- stop_boot
- ;;
- *)
- echo "Unknown error; help!"
- stop_boot
- ;;
- esac
- fi
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/gated b/etc/rc.d/gated
deleted file mode 100755
index 7a11e8c22425..000000000000
--- a/etc/rc.d/gated
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: gated,v 1.3 2000/05/13 08:45:06 lukem Exp $
-#
-
-# PROVIDE: gated
-# REQUIRE: DAEMON
-
-. /etc/rc.subr
-
-name="gated"
-rcvar=$name
-command="/usr/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-required_files="/etc/${name}.conf"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/ifwatchd b/etc/rc.d/ifwatchd
deleted file mode 100644
index ec23ce28421e..000000000000
--- a/etc/rc.d/ifwatchd
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/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"
-
diff --git a/etc/rc.d/inetd b/etc/rc.d/inetd
deleted file mode 100755
index 8f6249f51e3d..000000000000
--- a/etc/rc.d/inetd
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: inetd,v 1.5 2000/07/17 15:24:48 lukem Exp $
-#
-
-# PROVIDE: inetd
-# REQUIRE: DAEMON LOGIN
-# KEYWORD: shutdown
-
-. /etc/rc.subr
-
-name="inetd"
-rcvar=$name
-command="/usr/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-required_files="/etc/${name}.conf"
-extra_commands="reload"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/ipfilter b/etc/rc.d/ipfilter
deleted file mode 100755
index 557eefb51289..000000000000
--- a/etc/rc.d/ipfilter
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: ipfilter,v 1.9 2000/10/09 06:11:38 nisimura Exp $
-#
-
-# PROVIDE: ipfilter
-# REQUIRE: root beforenetlkm mountcritlocal tty
-
-. /etc/rc.subr
-
-name="ipfilter"
-rcvar=$name
-start_precmd="ipfilter_prestart"
-start_cmd="ipfilter_start"
-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 resync status"
-
-ipfilter_prestart()
-{
- if [ ! -f /etc/ipf.conf ] && [ ! -f /etc/ipf6.conf ]; then
- warn "/etc/ipf*.conf not readable; ipfilter start aborted."
- #
- # If booting directly to multiuser, send SIGTERM to
- # the parent (/etc/rc) to abort the boot
- #
- if [ "$autoboot" = yes ]; then
- echo "ERROR: ABORTING BOOT (sending SIGTERM to parent)!"
- kill -TERM $$
- exit 1
- fi
- return 1
- fi
- return 0
-}
-
-ipfilter_start()
-{
- echo "Enabling ipfilter."
- /sbin/ipf -E -Fa
- if [ -f /etc/ipf.conf ]; then
- /sbin/ipf -f /etc/ipf.conf
- fi
- if [ -f /etc/ipf6.conf ]; then
- /sbin/ipf -6 -f /etc/ipf6.conf
- fi
-}
-
-ipfilter_stop()
-{
- echo "Disabling ipfilter."
- /sbin/ipf -D
-}
-
-ipfilter_reload()
-{
- echo "Reloading ipfilter rules."
-
- /sbin/ipf -I -Fa
- if [ -f /etc/ipf.conf ] && ! /sbin/ipf -I -f /etc/ipf.conf; then
- err 1 "reload of ipf.conf failed; not swapping to new ruleset."
- fi
- if [ -f /etc/ipf6.conf ] && ! /sbin/ipf -I -6 -f /etc/ipf6.conf; then
- err 1 "reload of ipf6.conf failed; not swapping to new ruleset."
- fi
- /sbin/ipf -s
-}
-
-ipfilter_resync()
-{
- /sbin/ipf -y
-}
-
-ipfilter_status()
-{
- /sbin/ipf -V
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/ipfs b/etc/rc.d/ipfs
deleted file mode 100755
index 0abdba07826c..000000000000
--- a/etc/rc.d/ipfs
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/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"
diff --git a/etc/rc.d/ipmon b/etc/rc.d/ipmon
deleted file mode 100755
index 67e46b658c53..000000000000
--- a/etc/rc.d/ipmon
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-#
-# $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="-D"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/ipnat b/etc/rc.d/ipnat
deleted file mode 100755
index 05162ef74aaf..000000000000
--- a/etc/rc.d/ipnat
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: ipnat,v 1.6 2000/09/19 13:04:38 lukem Exp $
-#
-
-# PROVIDE: ipnat
-# REQUIRE: ipfilter mountcritremote
-# BEFORE: DAEMON
-
-. /etc/rc.subr
-
-name="ipnat"
-rcvar=$name
-config="/etc/ipnat.conf"
-start_cmd="ipnat_start"
-stop_cmd="/usr/sbin/ipnat -F -C"
-reload_cmd="/usr/sbin/ipnat -F -C -f ${config}"
-extra_commands="reload"
-
-ipnat_start()
-{
- if [ ! -f ${config} ]; then
- return 0
- fi
- if ! checkyesno ipfilter || [ ! -f /etc/ipf.conf ]; then
- echo "Enabling ipfilter for NAT."
- /sbin/ipf -E -Fa
- fi
- echo -n "Installing NAT rules ... "
- /usr/sbin/ipnat -F -f ${config}
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/ipsec b/etc/rc.d/ipsec
deleted file mode 100755
index 0f84bde7fa8c..000000000000
--- a/etc/rc.d/ipsec
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/sh
-#
-# $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.
-
-. /etc/rc.subr
-
-name="ipsec"
-rcvar=$name
-start_precmd="ipsec_prestart"
-start_cmd="ipsec_start"
-stop_precmd="test -f /etc/ipsec.conf"
-stop_cmd="ipsec_stop"
-reload_cmd="ipsec_reload"
-extra_commands="reload"
-
-ipsec_prestart()
-{
- if [ ! -f /etc/ipsec.conf ]; then
- warn "/etc/ipsec.conf not readable; ipsec start aborted."
- #
- # If booting directly to multiuser, send SIGTERM to
- # the parent (/etc/rc) to abort the boot
- #
- if [ "$autoboot" = yes ]; then
- echo "ERROR: ABORTING BOOT (sending SIGTERM to parent)!"
- kill -TERM $$
- exit 1
- fi
- return 1
- fi
- return 0
-}
-
-ipsec_start()
-{
- echo "Installing ipsec manual keys/policies."
- /sbin/setkey -f /etc/ipsec.conf
-}
-
-ipsec_stop()
-{
- echo "Clearing ipsec manual keys/policies."
-
- # still not 100% sure if we would like to do this.
- # it is very questionable to do this during shutdown session, since
- # it can hang any of remaining IPv4/v6 session.
- #
- /sbin/setkey -F
- /sbin/setkey -FP
-}
-
-ipsec_reload()
-{
- echo "Reloading ipsec manual keys/policies."
- /sbin/setkey -F
- /sbin/setkey -FP
- /sbin/setkey -f /etc/ipsec.conf
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/isdnd b/etc/rc.d/isdnd
deleted file mode 100644
index 5363df4ae7db..000000000000
--- a/etc/rc.d/isdnd
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: isdnd,v 1.8 2002/03/22 04:33:58 thorpej Exp $
-#
-
-# PROVIDE: isdnd
-# 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
-
-name="isdnd"
-rcvar=$name
-required_files="/etc/isdn/${name}.rc"
-
-command="/usr/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/kdc b/etc/rc.d/kdc
deleted file mode 100755
index d91cefd8ff1b..000000000000
--- a/etc/rc.d/kdc
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: kdc,v 1.4 2002/01/31 01:26:05 lukem Exp $
-#
-
-# PROVIDE: kdc
-# REQUIRE: NETWORKING
-# BEFORE: SERVERS
-
-. /etc/rc.subr
-
-name="kdc"
-rcvar=$name
-command="/usr/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-required_files="/etc/krb5.conf"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/ldconfig b/etc/rc.d/ldconfig
deleted file mode 100755
index 22cf6734385e..000000000000
--- a/etc/rc.d/ldconfig
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-#
-# $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 ${ldconfig_command} ]; then
- echo "Creating a.out runtime link editor directory cache."
- ${ldconfig_command}
- fi
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/lkm1 b/etc/rc.d/lkm1
deleted file mode 100755
index 8e71dafbf28e..000000000000
--- a/etc/rc.d/lkm1
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: lkm1,v 1.5 2000/09/19 13:04:38 lukem Exp $
-#
-
-# PROVIDE: beforenetlkm
-# REQUIRE: root bootconf
-
-. /etc/rc.subr
-
-name="lkm1"
-rcvar="lkm"
-start_cmd="lkm1_start"
-stop_cmd="lkm1_stop"
-
-lkm1_start()
-{
-# load kernel modules specified in /etc/lkm.conf if the /usr
-# filesystem is already present with "/" or can be mounted now
-#
- if [ -f /etc/rc.lkm ]; then
- mount /usr >/dev/null 2>&1
- if [ -x /usr/bin/ld ]; then
- lkmstage=BEFORENET
- set start ; . /etc/rc.lkm
- fi
- fi
-}
-
-lkm1_stop()
-{
- if [ -f /etc/rc.lkm ] && [ -x /usr/bin/ld ]; then
- lkmstage=BEFORENET
- set stop ; . /etc/rc.lkm
- fi
-}
-
-load_rc_config lkm
-run_rc_command "$1"
diff --git a/etc/rc.d/lkm2 b/etc/rc.d/lkm2
deleted file mode 100755
index b7b69b97c466..000000000000
--- a/etc/rc.d/lkm2
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: lkm2,v 1.3 2000/07/15 02:30:18 lukem Exp $
-#
-
-# PROVIDE: beforemountlkm
-# REQUIRE: syslogd
-
-. /etc/rc.subr
-
-name="lkm2"
-rcvar="lkm"
-start_cmd="lkm2_start"
-stop_cmd="lkm2_stop"
-
-# load kernel modules specified in /etc/lkm.conf
-#
-lkm2_start()
-{
- if [ -r /etc/rc.lkm ]; then
- lkmstage=BEFOREMOUNT
- set start ; . /etc/rc.lkm
- else
- warn "/etc/rc.lkm not found; LKMs not loaded."
- fi
-}
-
-lkm2_stop()
-{
- if [ -r /etc/rc.lkm ]; then
- lkmstage=BEFOREMOUNT
- set stop ; . /etc/rc.lkm
- fi
-}
-
-load_rc_config lkm
-run_rc_command "$1"
diff --git a/etc/rc.d/lkm3 b/etc/rc.d/lkm3
deleted file mode 100755
index d16647e656ac..000000000000
--- a/etc/rc.d/lkm3
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: lkm3,v 1.5 2000/09/19 13:04:38 lukem Exp $
-#
-
-# PROVIDE: aftermountlkm
-# REQUIRE: mountall
-# BEFORE: DAEMON
-
-. /etc/rc.subr
-
-name="lkm3"
-rcvar="lkm"
-start_cmd="do_lkm3 start"
-stop_cmd="do_lkm3 stop"
-
-do_lkm3()
-{
- # (un)load kernel modules specified in /etc/lkm.conf
- #
- if [ -f /etc/rc.lkm ]; then
- lkmstage=AFTERMOUNT
- set $1 ; . /etc/rc.lkm
- fi
-}
-
-load_rc_config lkm
-run_rc_command "$1"
diff --git a/etc/rc.d/local b/etc/rc.d/local
deleted file mode 100755
index 5a86440101ea..000000000000
--- a/etc/rc.d/local
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: local,v 1.5 2000/08/21 23:33:06 lukem Exp $
-#
-
-# REQUIRE: DAEMON
-# PROVIDE: local
-# BEFORE: LOGIN
-# KEYWORD: shutdown
-
-. /etc/rc.subr
-
-name="local"
-start_cmd="local_start"
-stop_cmd="local_stop"
-
-local_start()
-{
- if [ -f /etc/rc.local ]; then
- . /etc/rc.local
- fi
-}
-
-local_stop()
-{
- if [ -f /etc/rc.shutdown.local ]; then
- . /etc/rc.shutdown.local
- fi
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/lpd b/etc/rc.d/lpd
deleted file mode 100755
index 99ed994f9af1..000000000000
--- a/etc/rc.d/lpd
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: lpd,v 1.4 2000/09/19 13:04:38 lukem Exp $
-#
-
-# PROVIDE: lpd
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="lpd"
-rcvar=$name
-command="/usr/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-required_files="/etc/printcap"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/mixerctl b/etc/rc.d/mixerctl
deleted file mode 100755
index 16fcbb9d4163..000000000000
--- a/etc/rc.d/mixerctl
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/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"
diff --git a/etc/rc.d/mopd b/etc/rc.d/mopd
deleted file mode 100755
index f7d1c0dc86ee..000000000000
--- a/etc/rc.d/mopd
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: mopd,v 1.4 2000/09/19 13:04:38 lukem Exp $
-#
-
-# PROVIDE: mopd
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="mopd"
-rcvar=$name
-command="/usr/sbin/${name}"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/motd b/etc/rc.d/motd
deleted file mode 100755
index 9032539f1cec..000000000000
--- a/etc/rc.d/motd
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: motd,v 1.7 2001/04/25 23:23:37 lukem Exp $
-#
-
-# PROVIDE: motd
-# REQUIRE: mountcritremote
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="motd"
-rcvar="update_motd"
-start_cmd="motd_start"
-stop_cmd=":"
-
-motd_start()
-{
- # Update kernel info in /etc/motd
- # Must be done *before* interactive logins are possible
- # to prevent possible race conditions.
- #
- echo "Updating motd."
- 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
-run_rc_command "$1"
diff --git a/etc/rc.d/mountall b/etc/rc.d/mountall
deleted file mode 100755
index 2fd80eb6d3a6..000000000000
--- a/etc/rc.d/mountall
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: mountall,v 1.2 2000/04/27 21:00:50 veego Exp $
-#
-
-# PROVIDE: mountall
-# REQUIRE: beforemountlkm
-
-. /etc/rc.subr
-
-name="mountall"
-start_cmd="echo 'Mounting all filesystems...'; mount -a"
-stop_cmd="echo 'Unmounting all filesystems...'; umount -a"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/mountcritlocal b/etc/rc.d/mountcritlocal
deleted file mode 100755
index 53d8d4a6b5f9..000000000000
--- a/etc/rc.d/mountcritlocal
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: mountcritlocal,v 1.6 2002/03/27 08:53:42 lukem Exp $
-#
-
-# PROVIDE: mountcritlocal
-# REQUIRE: root
-
-. /etc/rc.subr
-
-name="mountcritlocal"
-start_cmd="mountcritlocal_start"
-stop_cmd=":"
-
-mountcritlocal_start()
-{
- # Mount critical filesystems that are `local'
- # (as specified in $critical_filesystems_local)
- # This usually includes /var.
- #
- mount_critical_filesystems local
-
- # clean up left-over files.
- # this could include the cleanup of lock files and /var/run, etc.
- #
- rm -f /etc/nologin /var/spool/lock/LCK.* /var/spool/uucp/STST/*
- (cd /var/run && rm -rf -- *)
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/mountcritremote b/etc/rc.d/mountcritremote
deleted file mode 100755
index 1e7b8395ae78..000000000000
--- a/etc/rc.d/mountcritremote
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: mountcritremote,v 1.6 2002/03/27 08:53:42 lukem Exp $
-#
-
-# PROVIDE: mountcritremote
-# REQUIRE: NETWORKING root mountcritlocal
-
-. /etc/rc.subr
-
-name="mountcritremote"
-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"
diff --git a/etc/rc.d/mountd b/etc/rc.d/mountd
deleted file mode 100755
index 713d72b6768a..000000000000
--- a/etc/rc.d/mountd
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: mountd,v 1.10 2001/06/16 06:13:10 lukem Exp $
-#
-
-# PROVIDE: mountd
-# REQUIRE: NETWORKING mountall beforemountlkm rpcbind quota
-
-. /etc/rc.subr
-
-name="mountd"
-rcvar=$name
-command="/usr/sbin/${name}"
-required_files="/etc/exports"
-start_precmd="mountd_precmd"
-extra_commands="reload"
-
-mountd_precmd()
-{
- rm -f /var/db/mountdtab
- ( umask 022 ; > /var/db/mountdtab )
- return 0
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/moused b/etc/rc.d/moused
deleted file mode 100644
index 075bf48a7219..000000000000
--- a/etc/rc.d/moused
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/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"
diff --git a/etc/rc.d/mrouted b/etc/rc.d/mrouted
deleted file mode 100755
index 7d40ec4f3610..000000000000
--- a/etc/rc.d/mrouted
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: mrouted,v 1.5 2000/09/19 13:04:39 lukem Exp $
-#
-
-# PROVIDE: mrouted
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="mrouted"
-rcvar=$name
-command="/usr/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-required_files="/etc/${name}.conf"
-extra_commands="reload"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/named b/etc/rc.d/named
deleted file mode 100755
index 903a20a60b91..000000000000
--- a/etc/rc.d/named
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: named,v 1.10 2002/03/22 04:33:59 thorpej Exp $
-#
-
-# PROVIDE: named
-# REQUIRE: SERVERS
-# BEFORE: DAEMON
-# KEYWORD: chrootdir
-
-. /etc/rc.subr
-
-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"
diff --git a/etc/rc.d/ndbootd b/etc/rc.d/ndbootd
deleted file mode 100755
index e24f8fc0a971..000000000000
--- a/etc/rc.d/ndbootd
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/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"
diff --git a/etc/rc.d/network b/etc/rc.d/network
deleted file mode 100755
index 906ce16f9e5d..000000000000
--- a/etc/rc.d/network
+++ /dev/null
@@ -1,380 +0,0 @@
-#!/bin/sh
-#
-# $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
-
-name="network"
-start_cmd="network_start"
-stop_cmd="network_stop"
-
-network_start()
-{
- # set hostname, turn on network
- #
- echo "Starting network."
-
- # If $hostname is set, use it for my Internet name,
- # otherwise use /etc/myname
- #
- if [ -z "$hostname" ] && [ -f /etc/myname ]; then
- hostname=`cat /etc/myname`
- fi
- if [ -n "$hostname" ]; then
- echo "Hostname: $hostname"
- hostname $hostname
- else
- # Don't warn about it if we're going to run
- # DHCP later, as we will probably get the
- # hostname at that time.
- #
- if ! checkyesno dhclient && [ -z "`hostname`" ]; then
- warn "\$hostname not set."
- fi
- fi
-
- # Check $domainname first, then /etc/defaultdomain,
- # for NIS/YP domain name
- #
- if [ -z "$domainname" ] && [ -f /etc/defaultdomain ]; then
- domainname=`cat /etc/defaultdomain`
- fi
- if [ -n "$domainname" ]; then
- echo "NIS domainname: $domainname"
- domainname $domainname
- fi
-
- # Flush all routes just to make sure it is clean
- if checkyesno flushroutes; then
- route -n flush
- fi
-
- # Set the address for the first loopback interface, so that the
- # auto-route from a newly configured interface's address to lo0
- # works correctly.
- #
- # 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 must not leave the node.
- #
- route -q add -inet 127.0.0.0 -netmask 0xff000000 127.0.0.1 -reject
-
- # IPv6 routing setups, and host/router mode selection.
- #
- if ifconfig lo0 inet6 >/dev/null 2>&1; then
- # We have IPv6 support in kernel.
-
- # disallow link-local unicast dest without outgoing scope
- # identifiers.
- #
- route -q add -inet6 fe80:: -prefixlen 10 ::1 -reject
-
- # disallow site-local unicast dest without outgoing scope
- # identifiers.
- # If you configure site-locals without scope id (it is
- # permissible config for routers that are not on scope
- # boundary), you may want to comment the following one out.
- #
- if ! checkyesno ip6sitelocal; then
- route -q add -inet6 fec0:: -prefixlen 10 ::1 -reject
- fi
-
- # disallow "internal" addresses to appear on the wire.
- #
- route -q add -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject
-
- # disallow packets to malicious IPv4 compatible prefix
- #
- 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 -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:
- # (1) An IPv6-only KAME node tries to originate packets to IPv4
- # comatible destination. The KAME node has no IPv4
- # compatible support. Under RFC1933, it should transmit
- # native IPv6 packets toward IPv4 compatible destination,
- # hoping it would reach a router that forwards the packet
- # toward auto-tunnel interface.
- # (2) An IPv6-only node originates a packet to IPv4 compatible
- # destination. A KAME node is acting as an IPv6 router, and
- # asked to forward it.
- # Due to rare use of IPv4 compatible address, and security
- # issues with it, we disable it by default.
- #
- route -q add -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject
-
- sysctl -qw net.inet6.ip6.forwarding=0
- sysctl -qw net.inet6.ip6.accept_rtadv=0
-
- case $ip6mode in
- router)
- echo 'IPv6 mode: router'
- sysctl -qw net.inet6.ip6.forwarding=1
- ;;
-
- autohost)
- echo 'IPv6 mode: autoconfigured host'
- sysctl -qw net.inet6.ip6.accept_rtadv=1
- ;;
-
- host)
- echo 'IPv6 mode: host'
- ;;
-
- *) warn "invalid \$ip6mode value "\"$ip6mode\"
- ;;
-
- esac
- fi
-
- # Configure all of the network interfaces listed in $net_interfaces;
- # if $auto_ifconfig is YES, grab all interfaces from ifconfig.
- # In the following, "xxN" stands in for interface names, like "le0".
- # For any interfaces that has an $ifconfig_xxN variable associated,
- # 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 separate "ifconfig"
- # invocation.
- #
- # In order to configure an interface reasonably, you at the very least
- # need to specify "[addr_family] [hostname]" (e.g "inet my.domain.org"),
- # and probably a netmask (as in "netmask 0xffffffe0"). You will
- # frequently need to specify a media type, as in "media UTP", for
- # interface cards with multiple media connections that do not
- # autoconfigure. See the ifconfig manual page for details.
- #
- # Note that /etc/ifconfig.xxN takes multiple lines. The following
- # configuration is possible:
- # inet 10.1.1.1 netmask 0xffffff00
- # inet 10.1.1.2 netmask 0xffffff00 alias
- # inet6 fec0::1 prefixlen 64 alias
- #
- # You can put shell script fragment into /etc/ifconfig.xxN by
- # starting a line with "!". Refer to ifconfig.if(5) for details.
- #
- if [ "$net_interfaces" != NO ]; then
- if checkyesno auto_ifconfig; then
- tmp=`ifconfig -l`
- for cloner in `ifconfig -C 2>/dev/null`; do
- for int in /etc/ifconfig.${cloner}[0-9]*; do
- [ ! -f $int ] && break
- tmp="$tmp ${int##*.}"
- done
- done
- else
- tmp="$net_interfaces"
- fi
- echo -n 'Configuring network interfaces:'
- for int in $tmp; do
- eval args=\$ifconfig_$int
- if [ -n "$args" ]; then
- echo -n " $int"
- ifconfig $int $args
- elif [ -f /etc/ifconfig.$int ]; then
- echo -n " $int"
- while read args; do
- [ -z "$args" ] && continue
- case "$args" in
- "#"*)
- ;;
- "!"*)
- eval ${args#*!}
- ;;
- *)
- ifconfig $int $args
- ;;
- esac
- done < /etc/ifconfig.$int
- else
- if ! checkyesno auto_ifconfig; then
- echo
- warn \
- "/etc/ifconfig.$int missing and ifconfig_$int not set;"
- warn "interface $int not configured."
- fi
- continue
- fi
- configured_interfaces="$configured_interfaces $int"
- done
- echo "."
- fi
-
- # Check $defaultroute, then /etc/mygate, for the name of my gateway
- # host. That name must be in /etc/hosts.
- #
- if [ -z "$defaultroute" ] && [ -f /etc/mygate ]; then
- defaultroute=`cat /etc/mygate`
- fi
- if [ -n "$defaultroute" ]; then
- route add default $defaultroute
- fi
-
- # Check if each configured interface xxN has an $ifaliases_xxN variable
- # associated, then configure additional IP addresses for that interface.
- # The variable contains a list of "address netmask" pairs, with
- # "netmask" set to "-" if the interface default netmask is to be used.
- #
- # Note that $ifaliases_xxN works only with certain configurations and
- # considered not recommended. Use /etc/ifconfig.xxN if possible.
- #
- #
- if [ -n "$configured_interfaces" ]; then
- echo "Adding interface aliases:"
- done_aliases_message=yes
- fi
- for int in $configured_interfaces; do
- eval args=\$ifaliases_$int
- if [ -n "$args" ]; then
- set -- $args
- while [ $# -ge 2 ]; do
- addr=$1 ; net=$2 ; shift 2
- if [ "$net" = "-" ]; then
- # for compatibility only, obsolete
- ifconfig $int inet alias $addr
- else
- ifconfig $int inet alias $addr \
- netmask $net
- fi
- done
- fi
- done
-
- # /etc/ifaliases, if it exists, contains the names of additional IP
- # addresses for each interface. It is formatted as a series of lines
- # that contain
- # address interface netmask
- #
- # Note that /etc/ifaliases works only with certain cases only and its
- # use is not recommended. Use /etc/ifconfig.xxN instead.
- #
- #
- if [ -f /etc/ifaliases ]; then
- if [ "$done_aliases_message" != yes ]; then
- echo "Adding interface aliases:"
- fi
- while read addr int net; do
- if [ -z "$net" ]; then
- # for compatibility only, obsolete
- ifconfig $int inet alias $addr
- else
- ifconfig $int inet alias $addr netmask $net
- fi
- done < /etc/ifaliases
- fi
-
- # IPv6 interface autoconfiguration.
- #
- if ifconfig lo0 inet6 >/dev/null 2>&1; then
- # wait till DAD is completed. always invoke it in case
- # if are configured manually by ifconfig
- #
- dadcount=`sysctl -n net.inet6.ip6.dad_count 2>/dev/null`
- sleep $dadcount
- sleep 1
-
- if checkyesno rtsol; then
- if [ "$ip6mode" = "autohost" ]; then
- echo 'Sending router solicitation...'
- rtsol $rtsol_flags
- else
- echo
- warn \
- "ip6mode must be set to 'autohost' to use rtsol."
- fi
-
- # wait till DAD is completed, for global addresses
- # configured by router advert message.
- #
- sleep $dadcount
- sleep 1
- 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
- fi
-}
-
-network_stop()
-{
- echo "Stopping network."
-
- # XXX this must die
- if [ -s /etc/netstart.local ]; then
- sh /etc/netstart.local stop
- fi
-
- echo "Deleting aliases."
- if [ -f /etc/ifaliases ]; then
- while read addr int net; do
- ifconfig $int inet delete $addr
- done < /etc/ifaliases
- fi
-
- for int in `ifconfig -lu`; do
- eval args=\$ifaliases_$int
- if [ -n "$args" ]; then
- set -- $args
- while [ $# -ge 2 ]; do
- addr=$1 ; net=$2 ; shift 2
- ifconfig $int inet delete $addr
- done
- fi
- done
-
- # down interfaces
- #
- echo -n 'Downing network interfaces:'
- if [ "$net_interfaces" != NO ]; then
- if checkyesno auto_ifconfig; then
- tmp=`ifconfig -l`
- else
- tmp="$net_interfaces"
- fi
- for int in $tmp; do
- eval args=\$ifconfig_$int
- if [ -n "$args" ] || [ -f /etc/ifconfig.$int ]; then
- echo -n " $int"
- ifconfig $int down
- fi
- done
- echo "."
- fi
-
- # flush routes
- #
- route -n flush
-
- # resync ipf(4)
- if checkyesno ipfilter; then
- /sbin/ipf -y
- fi
-
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/newsyslog b/etc/rc.d/newsyslog
deleted file mode 100755
index e4a097ec332c..000000000000
--- a/etc/rc.d/newsyslog
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: newsyslog,v 1.4 2002/03/22 04:33:59 thorpej Exp $
-#
-
-# PROVIDE: newsyslog
-# REQUIRE: mountcritremote sysdb
-# BEFORE: syslogd SERVERS
-
-. /etc/rc.subr
-
-name="newsyslog"
-rcvar=$name
-required_files="/etc/newsyslog.conf"
-start_cmd="newsyslog_start"
-stop_cmd=":"
-
-newsyslog_start()
-{
- echo -n "Trimming log files:"
- /usr/bin/newsyslog -s $rc_flags
- echo " done."
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/nfsd b/etc/rc.d/nfsd
deleted file mode 100755
index 7d84dcff87f1..000000000000
--- a/etc/rc.d/nfsd
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: nfsd,v 1.3 2000/06/02 22:54:12 fvdl Exp $
-#
-
-# PROVIDE: nfsd
-# REQUIRE: mountd
-
-. /etc/rc.subr
-
-name="nfsd"
-rcvar="nfs_server"
-command="/usr/sbin/${name}"
-required_vars="mountd rpcbind"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/nfslocking b/etc/rc.d/nfslocking
deleted file mode 100755
index a9efc314dc05..000000000000
--- a/etc/rc.d/nfslocking
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-#
-# $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 ||
- [ -n "$rc_force" ]'
-stop_precmd=$start_precmd
-status_precmd=$start_precmd
-
-name="statd"
-rcvar=$name
-command="/usr/sbin/rpc.${name}"
-load_rc_config $name
-run_rc_command "$arg"
-
-name="lockd"
-rcvar=$name
-command="/usr/sbin/rpc.${name}"
-load_rc_config $name
-run_rc_command "$arg"
diff --git a/etc/rc.d/ntpd b/etc/rc.d/ntpd
deleted file mode 100755
index ae54ebba3902..000000000000
--- a/etc/rc.d/ntpd
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: ntpd,v 1.8 2002/06/17 06:47:59 lukem Exp $
-#
-
-# PROVIDE: ntpd
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-# KEYWORD: chrootdir
-
-. /etc/rc.subr
-
-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"
diff --git a/etc/rc.d/ntpdate b/etc/rc.d/ntpdate
deleted file mode 100755
index 4105b85d0552..000000000000
--- a/etc/rc.d/ntpdate
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: ntpdate,v 1.7 2002/01/31 01:26:06 lukem Exp $
-#
-
-# PROVIDE: ntpdate
-# REQUIRE: NETWORKING syslogd
-
-. /etc/rc.subr
-
-name="ntpdate"
-rcvar=$name
-start_cmd="ntpdate_start"
-stop_cmd=":"
-
-ntpdate_start()
-{
- if [ -z "$ntpdate_hosts" ]; then
- ntpdate_hosts=`awk '
- /^server[ \t]*127.127/ {next}
- /^(server|peer)/ {print $2}
- ' </etc/ntp.conf`
- fi
- if [ -n "$ntpdate_hosts" ]; then
- echo "Setting date via ntp."
- ntpdate $rc_flags $ntpdate_hosts
- fi
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/poffd b/etc/rc.d/poffd
deleted file mode 100644
index 12422c4766ef..000000000000
--- a/etc/rc.d/poffd
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD$
-#
-
-# PROVIDE: poffd
-# REQUIRE: DAEMON
-
-. /etc/rc.subr
-
-name="poffd"
-rcvar=$name
-command="/usr/sbin/${name}"
-start_precmd="test -c /dev/pow0"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/postfix b/etc/rc.d/postfix
deleted file mode 100755
index e826ccc9e116..000000000000
--- a/etc/rc.d/postfix
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: postfix,v 1.5 2000/09/19 13:04:39 lukem Exp $
-#
-
-# PROVIDE: mail
-# REQUIRE: LOGIN
-# 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_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"
diff --git a/etc/rc.d/pwcheck b/etc/rc.d/pwcheck
deleted file mode 100755
index 9597bca0d315..000000000000
--- a/etc/rc.d/pwcheck
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: pwcheck,v 1.3 2000/07/26 00:11:49 lukem Exp $
-#
-
-# PROVIDE: pwcheck
-# REQUIRE: mountcritremote syslogd
-# BEFORE: DAEMON
-
-. /etc/rc.subr
-
-name="pwcheck"
-start_cmd="pwcheck_start"
-stop_cmd=":"
-
-pwcheck_start()
-{
- # check the password temp/lock file
- #
- if [ -f /etc/ptmp ]; then
- logger -s -p auth.err \
- "password file may be incorrect -- /etc/ptmp exists"
- fi
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/quota b/etc/rc.d/quota
deleted file mode 100755
index 57898baabc6b..000000000000
--- a/etc/rc.d/quota
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: quota,v 1.2 2000/05/13 08:45:08 lukem Exp $
-#
-
-# PROVIDE: quota
-# REQUIRE: mountall
-# BEFORE: DAEMON
-
-. /etc/rc.subr
-
-name="quota"
-start_cmd="quota_start"
-stop_cmd="/usr/sbin/quotaoff -a"
-
-quota_start()
-{
- echo -n "Checking quotas:"
- /usr/sbin/quotacheck -a
- echo " done."
- /usr/sbin/quotaon -a
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/racoon b/etc/rc.d/racoon
deleted file mode 100755
index cd30b083093f..000000000000
--- a/etc/rc.d/racoon
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: racoon,v 1.2 2001/04/26 03:55:16 lukem Exp $
-#
-
-# PROVIDE: ike
-# REQUIRE: isdnd kdc ppp
-# BEFORE: SERVERS
-
-. /etc/rc.subr
-
-name="racoon"
-rcvar=$name
-command="/usr/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-required_files="/etc/racoon/racoon.conf"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/raidframe b/etc/rc.d/raidframe
deleted file mode 100755
index e0a974ad593a..000000000000
--- a/etc/rc.d/raidframe
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: raidframe,v 1.5 2000/11/17 05:43:46 lukem Exp $
-#
-
-# PROVIDE: disks
-
-. /etc/rc.subr
-
-name="raidframe"
-start_cmd="raidframe_start"
-stop_cmd=":"
-
-raidframe_start()
-{
- # 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
- [ ! -f $cfg ] && continue
- dev=${cfg##*/}
- dev=${dev%%.conf}
- raidctl -c $cfg $dev
- done
-
- # Initiate parity/mirror reconstruction as needed, in the background.
- #
- (
- for dev in `sysctl -n hw.disknames`; do
- case $dev in
- raid[0-9]*)
- raidctl -P $dev
- ;;
- esac
- done
- ) &
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/rarpd b/etc/rc.d/rarpd
deleted file mode 100755
index c5bbd9352781..000000000000
--- a/etc/rc.d/rarpd
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: rarpd,v 1.4 2000/09/19 13:04:39 lukem Exp $
-#
-
-# PROVIDE: rarpd
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="rarpd"
-rcvar=$name
-command="/usr/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-required_files="/etc/ethers"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/rbootd b/etc/rc.d/rbootd
deleted file mode 100755
index b205768f5b61..000000000000
--- a/etc/rc.d/rbootd
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: rbootd,v 1.5 2000/09/19 13:04:39 lukem Exp $
-#
-
-# PROVIDE: rbootd
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="rbootd"
-rcvar=$name
-command="/usr/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-required_files="/etc/${name}.conf"
-extra_commands="reload"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/root b/etc/rc.d/root
deleted file mode 100755
index 8a7e3b0c7d98..000000000000
--- a/etc/rc.d/root
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: root,v 1.1.1.1 2000/03/10 11:53:24 lukem Exp $
-#
-
-# PROVIDE: root
-# REQUIRE: fsck
-
-. /etc/rc.subr
-
-name="root"
-start_cmd="root_start"
-stop_cmd=":"
-
-root_start()
-{
- umount -a >/dev/null 2>&1
- mount /
- rm -f /fastboot
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/route6d b/etc/rc.d/route6d
deleted file mode 100755
index be157f536ae7..000000000000
--- a/etc/rc.d/route6d
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: route6d,v 1.4 2000/09/19 13:04:39 lukem Exp $
-#
-
-# PROVIDE: route6d
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="route6d"
-rcvar=$name
-command="/usr/sbin/${name}"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/routed b/etc/rc.d/routed
deleted file mode 100755
index e96aa393dc07..000000000000
--- a/etc/rc.d/routed
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: routed,v 1.6 2001/04/06 09:38:54 wiz Exp $
-#
-
-# PROVIDE: routed
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="routed"
-rcvar=$name
-command="/sbin/${name}"
-start_precmd="routed_precmd"
-
-routed_precmd()
-{
- if checkyesno gated && checkyesno routed; then
- warn "gated and routed both requested to be run: only running gated."
- return 1
- fi
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/rpcbind b/etc/rc.d/rpcbind
deleted file mode 100755
index 1a479e9ef305..000000000000
--- a/etc/rc.d/rpcbind
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: rpcbind,v 1.5 2000/09/19 13:04:39 lukem Exp $
-#
-
-# PROVIDE: rpcbind
-# REQUIRE: NETWORKING ntpdate syslogd named ppp
-
-. /etc/rc.subr
-
-name="rpcbind"
-rcvar=$name
-command="/usr/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/rtadvd b/etc/rc.d/rtadvd
deleted file mode 100755
index 4ec9c7f079e2..000000000000
--- a/etc/rc.d/rtadvd
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: rtadvd,v 1.4 2000/09/19 13:04:39 lukem Exp $
-#
-
-# PROVIDE: rtadvd
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="rtadvd"
-rcvar=$name
-command="/usr/sbin/${name}"
-start_precmd="rtadvd_precmd"
-
-rtadvd_precmd()
-{
- if [ "$ip6mode" != "router" ]; then
- warn \
- "${name} cannot be used on IPv6 host, only on an IPv6 router."
- return 1
- fi
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/rtsold b/etc/rc.d/rtsold
deleted file mode 100755
index ef9b07c2ffb4..000000000000
--- a/etc/rc.d/rtsold
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: rtsold,v 1.4 2000/09/19 13:04:39 lukem Exp $
-#
-
-# PROVIDE: rtsold
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="rtsold"
-rcvar=$name
-command="/usr/sbin/${name}"
-start_precmd="rtsold_precmd"
-
-rtsold_precmd()
-{
- if [ "$ip6mode" != "autohost" ]; then
- warn "\$ip6mode must be set to 'autohost' to use ${name}."
- return 1
- fi
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/rwho b/etc/rc.d/rwho
deleted file mode 100755
index 6361ea74b6c3..000000000000
--- a/etc/rc.d/rwho
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: rwho,v 1.4 2000/09/19 13:04:39 lukem Exp $
-#
-
-# PROVIDE: rwho
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="rwhod"
-rcvar=$name
-command="/usr/sbin/${name}"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/savecore b/etc/rc.d/savecore
deleted file mode 100755
index 054ba80edb76..000000000000
--- a/etc/rc.d/savecore
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: savecore,v 1.4 2002/03/22 04:16:39 lukem Exp $
-#
-
-# PROVIDE: savecore
-# REQUIRE: syslogd
-# BEFORE: SERVERS
-
-. /etc/rc.subr
-
-name="savecore"
-rcvar=$name
-start_cmd="savecore_start"
-stop_cmd=":"
-
-savecore_start()
-{
- # /var/crash should be a directory or a symbolic link
- # to the crash directory if core dumps are to be saved.
- #
- if [ -d /var/crash/. ]; then
- echo "Checking for core dump..."
- savecore $rc_flags /var/crash
- else
- warn "No /var/crash directory; savecore not run."
- fi
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/screenblank b/etc/rc.d/screenblank
deleted file mode 100755
index b71b7e7ad29d..000000000000
--- a/etc/rc.d/screenblank
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: screenblank,v 1.4 2000/09/19 13:04:39 lukem Exp $
-#
-
-# PROVIDE: screenblank
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="screenblank"
-rcvar=$name
-command="/usr/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/securelevel b/etc/rc.d/securelevel
deleted file mode 100755
index bfeca93d8f9d..000000000000
--- a/etc/rc.d/securelevel
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: securelevel,v 1.3 2002/03/01 17:58:00 mrg Exp $
-#
-
-# PROVIDE: securelevel
-# REQUIRE: aftermountlkm ipnat mountd
-# BEFORE: DAEMON
-
-. /etc/rc.subr
-
-name="securelevel"
-start_cmd="securelevel_start"
-stop_cmd=":"
-
-securelevel_start()
-{
- # 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.
- #
- 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
- if [ "$osecurelevel" = 0 ]; then
- echo -n "Setting securelevel: "
- sysctl -w kern.securelevel=1
- fi
- fi
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/sendmail b/etc/rc.d/sendmail
deleted file mode 100755
index 992db664fa4a..000000000000
--- a/etc/rc.d/sendmail
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: sendmail,v 1.13 2000/12/18 07:56:41 jmc Exp $
-#
-
-# PROVIDE: mail
-# REQUIRE: LOGIN
-# we make mail start late, so that things like .forward's are not
-# processed until the system is fully operational
-
-. /etc/rc.subr
-
-name="sendmail"
-rcvar=$name
-command="/usr/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-required_files="/etc/mail/${name}.cf"
-start_precmd="sendmail_precmd"
-
-sendmail_precmd()
-{
- # Die if there's pre-8.10 custom configuration file. This check is
- # mandatory for smooth upgrade. See NetBSD PR 10100 for details.
- #
- if checkyesno sendmail && [ -f "/etc/${name}.cf" ]; then
- if ! cmp -s "/etc/mail/${name}.cf" "/etc/${name}.cf"; then
- warn \
- "${name} was not started; you have multiple copies of sendmail.cf."
- return 1
- fi
- fi
-
- # check modifications on /etc/mail/aliases
- if [ -f "/etc/mail/aliases.db" ]; then
- if [ "/etc/mail/aliases" -nt "/etc/mail/aliases.db" ]; then
- echo \
- "${name}: /etc/mail/aliases newer than /etc/mail/aliases.db, regenerating"
- /usr/bin/newaliases
- fi
- else
- echo \
- "${name}: /etc/mail/aliases.db not present, generating"
- /usr/bin/newaliases
- fi
-
- # check couple of common db files, too
- for f in genericstable virtusertable domaintable mailertable; do
- 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
- fi
- done
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/sshd b/etc/rc.d/sshd
deleted file mode 100755
index bf6f3a8efa57..000000000000
--- a/etc/rc.d/sshd
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: sshd,v 1.17 2002/04/29 05:55:06 lukem Exp $
-#
-
-# PROVIDE: sshd
-# REQUIRE: LOGIN
-
-. /etc/rc.subr
-
-name="sshd"
-rcvar=$name
-command="/usr/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-required_files="/etc/ssh/sshd_config"
-extra_commands="keygen reload"
-
-sshd_keygen()
-{
- (
- 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
- /usr/bin/ssh-keygen -t rsa1 -b 1024 \
- -f /etc/ssh/ssh_host_key -N ''
- fi
-
- 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
- /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/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
-}
-
-keygen_cmd=sshd_keygen
-start_precmd=sshd_precmd
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/swap1 b/etc/rc.d/swap1
deleted file mode 100755
index 4977e867c405..000000000000
--- a/etc/rc.d/swap1
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-#
-# $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.
-#
-swap1_start()
-{
- if ! checkyesno no_swap; then
- swapctl -A -t blk
- fi
-}
-
-# Remove all block-type swap devices
-#
-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"
diff --git a/etc/rc.d/swap2 b/etc/rc.d/swap2
deleted file mode 100755
index 9d17925430f7..000000000000
--- a/etc/rc.d/swap2
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: swap2,v 1.5 2000/08/21 23:35:41 lukem Exp $
-#
-
-# PROVIDE: nonlocalswap
-# REQUIRE: mountcritremote
-# BEFORE: DAEMON
-
-. /etc/rc.subr
-
-name="swap2"
-start_cmd="swap2_start"
-
-swap2_start()
-{
- # "Critical" file systems are now mounted. Go ahead and swap
- # to files now, since they will be residing in the critical file
- # systems (or, at least, they should be...).
- # Check for no swap, and warn about it unless that is desired.
- #
- swapctl -A -t noblk;
- if ! checkyesno no_swap; then
- if swapctl -s | grep "no swap devices configured" > /dev/null;
- then
- warn "No swap space configured!"
- fi
- fi
-}
-
-# Remove all non-block-type swap devices
-#
-stop_cmd="swapctl -U -t noblk"
-
-load_rc_config swap
-run_rc_command "$1"
diff --git a/etc/rc.d/sysctl b/etc/rc.d/sysctl
deleted file mode 100644
index c402146e219d..000000000000
--- a/etc/rc.d/sysctl
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: sysctl,v 1.11 2002/03/27 08:03:08 lukem Exp $
-#
-
-# PROVIDE: sysctl
-# REQUIRE: root ipfilter ipsec
-# BEFORE: DAEMON
-
-. /etc/rc.subr
-
-name="sysctl"
-start_cmd="sysctl_start"
-stop_cmd=":"
-
-sysctl_start()
-{
- if [ -r /etc/sysctl.conf ]; then
- echo "Setting sysctl variables:"
- sysctl -f /etc/sysctl.conf
- fi
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/sysdb b/etc/rc.d/sysdb
deleted file mode 100755
index f0cfbdd7c79e..000000000000
--- a/etc/rc.d/sysdb
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: sysdb,v 1.8 2001/04/16 01:38:15 lukem Exp $
-#
-
-# PROVIDE: sysdb
-# REQUIRE: mountcritremote
-# BEFORE: DAEMON
-
-. /etc/rc.subr
-
-name="sysdb"
-start_cmd="sysdb_start"
-stop_cmd=":"
-
-sysdb_start()
-{
- # Build ps databases. If this kernel supports
- # machdep.booted_kernel, use that to build the KVM db so dmesg
- # will run work when we boot /netbsd.new, etc.
- #
- echo "Building databases..."
- booted_kernel=`sysctl -n machdep.booted_kernel 2>/dev/null`
- kvm_mkdb "${booted_kernel:-/netbsd}"
- dev_mkdb
-
- # Re-create /var/run/utmp, which is deleted by mountcritlocal
- # but can't be recreated by it because install and chown may
- # not be available then (possibly no /usr).
- #
- install -c -m 664 -g utmp /dev/null /var/run/utmp
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/syslogd b/etc/rc.d/syslogd
deleted file mode 100755
index a91da28d034f..000000000000
--- a/etc/rc.d/syslogd
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: syslogd,v 1.12 2002/03/22 04:34:00 thorpej Exp $
-#
-
-# PROVIDE: syslogd
-# REQUIRE: mountcritremote sysdb wscons
-# BEFORE: SERVERS
-
-. /etc/rc.subr
-
-name="syslogd"
-rcvar=$name
-command="/usr/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-required_files="/etc/syslog.conf"
-start_precmd="syslogd_precmd"
-extra_commands="reload"
-
-_sockfile="/var/run/syslogd.sockets"
-
-syslogd_precmd()
-{
- # Transitional symlink for old binaries
- #
- if [ ! -h /dev/log ]; then
- ln -sf /var/run/log /dev/log
- fi
-
- # 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
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/timed b/etc/rc.d/timed
deleted file mode 100755
index 1e12a358deda..000000000000
--- a/etc/rc.d/timed
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: timed,v 1.4 2000/09/19 13:04:39 lukem Exp $
-#
-
-# PROVIDE: timed
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="timed"
-rcvar=$name
-command="/usr/sbin/${name}"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/ttys b/etc/rc.d/ttys
deleted file mode 100755
index 59a7b3098c6e..000000000000
--- a/etc/rc.d/ttys
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: ttys,v 1.3 2001/04/25 12:59:16 lukem Exp $
-#
-
-# PROVIDE: tty
-# REQUIRE: root
-
-. /etc/rc.subr
-
-name="ttyflags"
-start_cmd="ttyflags_start"
-stop_cmd=":"
-
-ttyflags_start()
-{
- # set flags on ttys.
- # (do early, in case they use tty for SLIP in network)
- #
- echo "Setting tty flags."
- ttyflags -a
-
- # setup ptys
- #
- # XXX: there may be more ptys than this; maybe use
- # sysctl kern.maxptys to find out how many?
- #
- 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
-run_rc_command "$1"
diff --git a/etc/rc.d/virecover b/etc/rc.d/virecover
deleted file mode 100755
index 66570d034da8..000000000000
--- a/etc/rc.d/virecover
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-#
-# $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"
-command="/usr/libexec/${name}"
-stop_cmd=":"
-reload_cmd=":"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/wscons b/etc/rc.d/wscons
deleted file mode 100755
index 2ff2e52da6cc..000000000000
--- a/etc/rc.d/wscons
+++ /dev/null
@@ -1,169 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: wscons,v 1.8 2002/03/22 04:34:00 thorpej Exp $
-#
-
-# PROVIDE: wscons
-# REQUIRE: mountcritremote
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="wscons"
-rcvar=$name
-start_cmd="wscons_start"
-stop_cmd=":"
-
-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=
-
- while [ $# -gt 0 ]; do
- case $1 in
- -n)
- DOIT=echo
- ;;
- -f)
- config=$2
- shift
- ;;
- -font)
- wsfld=$2
- shift
- ;;
- -screen)
- wscfg=$2
- shift
- ;;
- *)
- echo $usage
- exit 1
- ;;
- esac
- shift
- done
-
-
- # args mean:
- # screen idx scr emul
- # font name width height enc file
- ( while read type arg1 arg2 arg3 arg4 arg5; do
- case "$type" in
- \#*|"")
- continue
- ;;
-
- font)
- name=$arg1
- width=$arg2
- height=$arg3
- enc=$arg4
- file=$arg5
- cmd=$wsfld
-
- case $width in
- -)
- ;;
- *)
- cmd="$cmd -w $width"
- ;;
- esac
- case $height in
- -)
- ;;
- *)
- cmd="$cmd -h $height"
- ;;
- esac
- case $enc in
- -)
- ;;
- *)
- cmd="$cmd -e $enc"
- ;;
- esac
- cmd="$cmd -N $name $file"
- eval $DOIT $cmd
- ;;
-
- screen)
- idx=$arg1
- scr=$arg2
- emul=$arg3
- cmd=$wscfg
-
- case $scr in
- -)
- ;;
- *)
- cmd="$cmd -t $scr"
- ;;
- esac
- case $emul in
- -)
- ;;
- *)
- cmd="$cmd -e $emul"
- ;;
- esac
- cmd="$cmd $idx"
- eval $DOIT $cmd
- ;;
-
- keyboard)
- kbd=$arg1
- cmd=$wscfg
- case $kbd in
- -|auto)
- cmd="$cmd -k"
- ;;
- *)
- cmd="$cmd -k $kbd"
- ;;
- 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
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/xdm b/etc/rc.d/xdm
deleted file mode 100755
index a5c6b7665b40..000000000000
--- a/etc/rc.d/xdm
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: xdm,v 1.5 2000/07/17 15:24:48 lukem Exp $
-#
-
-# PROVIDE: xdm
-# REQUIRE: DAEMON LOGIN wscons
-# KEYWORD: shutdown
-
-. /etc/rc.subr
-
-name="xdm"
-rcvar=$name
-command="/usr/X11R6/bin/${name}"
-pidfile="/var/run/${name}.pid"
-required_files="/usr/X11R6/lib/X11/xdm/xdm-config"
-extra_commands="reload"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/xfs b/etc/rc.d/xfs
deleted file mode 100755
index 58ac900ee9bb..000000000000
--- a/etc/rc.d/xfs
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: xfs,v 1.5 2000/11/09 00:05:31 jdolecek Exp $
-#
-
-# PROVIDE: xfs
-# REQUIRE: mountall cleartmp
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="xfs"
-rcvar=$name
-command="/usr/X11R6/bin/${name}"
-command_args="& sleep 2"
-required_files="/usr/X11R6/lib/X11/fs/config"
-extra_commands="reload"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/ypbind b/etc/rc.d/ypbind
deleted file mode 100755
index bc69b3d9f800..000000000000
--- a/etc/rc.d/ypbind
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: ypbind,v 1.4 2000/09/19 13:04:39 lukem Exp $
-#
-
-# PROVIDE: ypbind
-# REQUIRE: ypserv
-# BEFORE: DAEMON
-
-. /etc/rc.subr
-
-name="ypbind"
-rcvar=$name
-command="/usr/sbin/${name}"
-start_precmd="ypbind_precmd"
-
-ypbind_precmd()
-{
- _domain=`domainname`
- if [ -z "$_domain" ]; then
- warn "domainname(1) is not set."
- return 1
- fi
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/yppasswdd b/etc/rc.d/yppasswdd
deleted file mode 100755
index cf5e49645fdd..000000000000
--- a/etc/rc.d/yppasswdd
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: yppasswdd,v 1.5 2000/09/19 13:04:39 lukem Exp $
-#
-
-# PROVIDE: yppasswdd
-# REQUIRE: ypserv ypbind
-# BEFORE: LOGIN
-
-. /etc/rc.subr
-
-name="yppasswdd"
-rcvar=$name
-command="/usr/sbin/rpc.${name}"
-required_vars="rpcbind ypserv"
-start_precmd="yppasswdd_precmd"
-
-yppasswdd_precmd()
-{
- _domain=`domainname`
- if [ -z "$_domain" ]; then
- warn "domainname(1) is not set."
- return 1
- fi
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/ypserv b/etc/rc.d/ypserv
deleted file mode 100755
index 69fdd200e0f9..000000000000
--- a/etc/rc.d/ypserv
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: ypserv,v 1.4 2000/06/02 22:54:13 fvdl Exp $
-#
-
-# PROVIDE: ypserv
-# REQUIRE: rpcbind
-
-. /etc/rc.subr
-
-name="ypserv"
-rcvar=$name
-command="/usr/sbin/${name}"
-required_vars="rpcbind"
-start_precmd="ypserv_precmd"
-
-ypserv_precmd()
-{
- _domain=`domainname`
- if [ -z "$_domain" ]; then
- warn "domainname(1) is not set."
- return 1
- fi
-
- if [ ! -d /var/yp/$_domain/. ]; then
- warn "/var/yp/$_domain is not a directory."
- return 1
- fi
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.shutdown b/etc/rc.shutdown
deleted file mode 100644
index bccf8360f485..000000000000
--- a/etc/rc.shutdown
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: rc.shutdown,v 1.3 2000/03/10 13:17:25 lukem Exp $
-#
-# rc.shutdown.sh --
-# Run the scripts in /etc/rc.d with reverse rcorder.
-
-export HOME=/
-export PATH=/sbin:/bin:/usr/sbin:/usr/bin
-
-. /etc/rc.subr
-. /etc/rc.conf
-
-if ! checkyesno do_rcshutdown; then
- echo "Skipping shutdown hooks."
- exit 0
-fi
-
-stty status '^T'
-
-# Set shell to ignore SIGINT (2), but not children;
-# shell catches SIGQUIT (3) and returns to single user.
-#
-trap : 2
-trap "echo 'Shutdown interrupted.'; exit 1" 3
-
-files=`rcorder -k shutdown /etc/rc.d/*`
-for i in $files; do # reverse order of files
- nfiles="$i $nfiles"
-done
-files=$nfiles
-
-for i in $files; do
- run_rc_script $i stop
-done
-
-date
-exit 0
diff --git a/etc/rc.subr b/etc/rc.subr
deleted file mode 100644
index 5292a3271b24..000000000000
--- a/etc/rc.subr
+++ /dev/null
@@ -1,586 +0,0 @@
-# $NetBSD: rc.subr,v 1.28 2000/11/06 00:08:30 lukem Exp $
-#
-# Copyright (c) 1997-2000 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Luke Mewburn.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the NetBSD
-# Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-# rc.subr
-# functions used by various rc scripts
-#
-
-#
-# functions
-# ---------
-
-#
-# checkyesno var
-# Test $1 variable, and warn if not set to YES or NO.
-# Return 0 if it's "yes" (et al), nonzero otherwise.
-#
-checkyesno()
-{
- eval _value=\$${1}
- case $_value in
-
- # "yes", "true", "on", or "1"
- [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
- return 0
- ;;
-
- # "no", "false", "off", or "0"
- [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0)
- return 1
- ;;
- *)
- warn "\$${1} is not set properly."
- return 1
- ;;
- esac
-}
-
-#
-# mount_critical_filesystems
-# Go through the list of critical filesystems, checking each one
-# to see if it is mounted, and if it is not, mounting it.
-#
-mount_critical_filesystems()
-{
- if [ $1 = local ]; then
- _fslist=$critical_filesystems_beforenet
- else
- _fslist=$critical_filesystems
- fi
- for _fs in $_fslist; do
- mount | (
- _ismounted=no
- while read what _on on _type type; do
- if [ $on = $_fs ]; then
- _ismounted=yes
- fi
- done
- if [ $_ismounted = no ]; then
- mount $_fs >/dev/null 2>&1
- fi
- )
- done
-}
-
-#
-# check_pidfile pidfile procname
-# Parses the first line of pidfile for a pid, and ensures
-# that the process is running and matches procname.
-# Prints the matching pid upon success, nothing otherwise.
-#
-check_pidfile()
-{
- _pidfile=$1
- _procname=$2
- if [ -z "$_pidfile" -o -z "$_procname" ]; then
- err 3 'USAGE: check_pidfile pidfile procname'
- fi
- if [ ! -f $_pidfile ]; then
- return
- fi
- read _pid _junk < $_pidfile
- if [ -z "$_pid" ]; then
- return
- fi
- _procnamebn=${_procname##*/}
- ps -p $_pid -o 'pid,command' | while read _npid _arg0 _argv; do
- if [ "$_npid" = "PID" ]; then
- continue
- fi
- if [ "$_arg0" = "$_procname" \
- -o "$_arg0" = "$_procnamebn" \
- -o "$_arg0" = "${_procnamebn}:" \
- -o "$_arg0" = "(${_procnamebn})" ]; then
- echo $_npid
- return
- fi
- done
-}
-
-#
-# check_process procname
-# Ensures that a process (or processes) named procname is running.
-# Prints a list of matching pids.
-#
-check_process()
-{
- _procname=$1
- if [ -z "$_procname" ]; then
- err 3 'USAGE: check_process procname'
- fi
- _procnamebn=${_procname##*/}
- _pref=
- ps -ax -o 'pid,command' | while read _npid _arg0 _argv; do
- if [ "$_npid" = "PID" ]; then
- continue
- fi
- if [ "$_arg0" = "$_procname" \
- -o "$_arg0" = "$_procnamebn" \
- -o "$_arg0" = "${_procnamebn}:" \
- -o "$_arg0" = "(${_procnamebn})" ]; then
- echo -n "$_pref$_npid"
- _pref=" "
- fi
- done
-}
-
-#
-# run_rc_command arg
-# Search for arg in the list of supported commands, which is:
-# "start stop restart rcvar status ${extra_commands}"
-# If there's a match, run ${arg}_cmd or the default command (see below).
-#
-# If arg has a given prefix, then change the operation as follows:
-# prefix operation
-# ------ ---------
-# fast Skip the pid check.
-# force Set ${rcvar} to YES.
-#
-# The following globals are used:
-#
-# name needed function
-# ---- ------ --------
-# name y Name of script.
-#
-# command n Full path to command.
-# Not needed if ${arg}_cmd is set for
-# each keyword.
-#
-# command_args n Optional args/shell directives for command.
-#
-# extra_commands n List of extra commands supported.
-#
-# pidfile n If set, use check_pidfile $pidfile, else if
-# $command is set, use check_process $command.
-#
-# rcvar n This is checked with checkyesno to determine
-# if the action should be run.
-#
-# ${name}_chroot n Directory to chroot to before running ${command}
-#
-# ${name}_chdir n Directory to cd to before running ${command}
-# (if not using ${name}_chroot).
-#
-# ${name}_flags n Arguments to call ${command} with.
-# NOTE: $flags from the parent environment
-# can be used to override this.
-#
-# ${name}_nice n Nice level to run ${command} at.
-#
-# ${name}_user n User to run ${command} as, using su(1) if not
-# using ${name}_chroot.
-#
-# ${name}_group n Group to run chrooted ${command} as.
-#
-# ${name}_groups n Supplementary group list to run chrooted
-# ${command} with.
-#
-# ${_arg}_cmd n If set, use this as the action when invoked;
-# $_arg is available to the action to use.
-# Otherwise, use default command (see below)
-#
-# ${_arg}_precmd n If set, run just before performing the main
-# action in the default command (i.e, after
-# checking for required bits and process
-# (non)existance).
-# If this completes with a non-zero exit code,
-# don't run ${_arg}_cmd.
-#
-# required_dirs n If set, check for the existence of the given
-# directories before running the default
-# (re)start command.
-#
-# required_files n If set, check for the readability of the given
-# files before running the default (re)start
-# command.
-#
-# required_vars n If set, perform checkyesno on each of the
-# listed variables before running the default
-# (re)start command.
-#
-# Default commands for a given arg:
-#
-# arg default
-# --- -------
-# status Show if ${command} is running, etc.
-#
-# start if !running && checkyesno ${rcvar}
-# ${command}
-#
-# stop if ${pidfile}
-# kill $sig_stop `check_pidfile $pidfile`
-# else
-# kill $sig_stop `check_process $command`
-# $sig_stop defaults to TERM.
-#
-# reload As stop, except use $sig_reload instead.
-# $sig_reload defaults to HUP.
-#
-# restart Run `stop' then `start'.
-#
-#
-run_rc_command()
-{
- _arg=$1
- if [ -z "$name" ]; then
- err 3 '$name is not set.'
- fi
-
- case "$_arg" in
- fast*) # "fast" prefix; don't check pid
- _arg=${_arg#fast}
- _rc_fast_run=YES
- ;;
- force*) # "force prefix; always start
- _arg=${_arg#force}
- _rc_force_run=YES
- if [ -n "${rcvar}" ]; then
- eval ${rcvar}=YES
- fi
- ;;
- esac
-
- _keywords="start stop restart rcvar $extra_commands"
- _pid=
- _pidcmd=
- # setup pid check command if not fast
- if [ -z "$_rc_fast_run" ]; then
- if [ -n "$pidfile" ]; then
- _pidcmd='_pid=`check_pidfile '$pidfile' '$command'`'
- elif [ -n "$command" ]; then
- _pidcmd='_pid=`check_process '$command'`'
- fi
- if [ -n "$_pidcmd" ]; then
- _keywords="${_keywords} status"
- fi
- fi
-
- if [ -z "$_arg" ]; then
- rc_usage "$_keywords"
- fi
-
- if [ -n "$flags" ]; then # allow override from environment
- _flags=$flags
- else
- eval _flags=\$${name}_flags
- fi
- eval _chdir=\$${name}_chdir
- eval _chroot=\$${name}_chroot
- eval _nice=\$${name}_nice
- eval _user=\$${name}_user
- eval _group=\$${name}_group
- eval _groups=\$${name}_groups
-
- # if ${rcvar} is set, and $1 is not
- # "rcvar" or "status", then run
- # checkyesno ${rcvar}
- # and return if that failed
- #
- if [ -n "${rcvar}" -a "$_arg" != "rcvar" -a "$_arg" != "status" ]; then
- if ! checkyesno ${rcvar}; then
- return 0
- fi
- fi
-
- eval $_pidcmd # determine the pid if necessary
-
- for _elem in $_keywords; do
- if [ "$_elem" != "$_arg" ]; then
- continue
- fi
-
- # if there's a custom ${XXX_cmd},
- # run that instead of the default
- #
- eval _cmd=\$${_arg}_cmd
- eval _precmd=\$${_arg}_precmd
- if [ -n "$_cmd" ]; then
- # if the precmd failed and force
- # isn't set, exit
- #
- if ! eval $_precmd && [ -z "$_rc_force_run" ]; then
- return 1
- fi
-
- eval $_cmd
- return 0
- fi
-
- case "$_arg" in # default operations...
-
- status)
- if [ -n "$_pid" ]; then
- echo "${name} is running as pid $_pid."
- else
- echo "${name} is not running."
- return 1
- fi
- ;;
-
- start)
- if [ -n "$_pid" ]; then
- echo "${name} already running? (pid=$_pid)."
- exit 1
- fi
-
- if [ ! -x $command ]; then
- return 0
- fi
-
- # check for required variables,
- # directories, and files
- #
- for _f in $required_vars; do
- if ! checkyesno $_f; then
- warn "\$${_f} is not set."
- if [ -z "$_rc_force_run" ]; then
- return 1
- fi
- fi
- done
- for _f in $required_dirs; do
- if [ ! -d "${_f}/." ]; then
- warn "${_f} is not a directory."
- if [ -z "$_rc_force_run" ]; then
- return 1
- fi
- fi
- done
- for _f in $required_files; do
- if [ ! -r "${_f}" ]; then
- warn "${_f} is not readable."
- if [ -z "$_rc_force_run" ]; then
- return 1
- fi
- fi
- done
-
- # if the precmd failed and force
- # isn't set, exit
- #
- if ! eval $_precmd && [ -z "$_rc_force_run" ]; then
- return 1
- fi
-
-
- # setup the command to run, and run it
- #
- echo "Starting ${name}."
- if [ -n "$_chroot" ]; then
- _doit="\
-${_nice:+nice -n $_nice }\
-chroot ${_user:+-u $_user }${_group:+-g $_group }${_groups:+-G $_groups }\
-$_chroot $command $_flags $command_args"
- else
- _doit="\
-${_user:+su -m $_user -c 'sh -c \"}\
-${_chdir:+cd $_chdir; }\
-${_nice:+nice -n $_nice }\
-$command $_flags $command_args\
-${_user:+\"'}"
- fi
- eval $_doit
- ;;
-
- stop)
- if [ -z "$_pid" ]; then
- if [ -n "$pidfile" ]; then
- echo \
- "${name} not running? (check $pidfile)."
- else
- echo "${name} not running?"
- fi
- exit 1
- fi
-
- if ! eval $_precmd && [ -z "$_rc_force_run" ]; then
- return 1
- fi
- echo "Stopping ${name}."
- _doit=\
-"${_user:+su -m $_user -c '}kill -${sig_stop:-TERM} $_pid${_user:+'}"
- eval $_doit
- ;;
-
- reload)
- if [ -z "$_pid" ]; then
- if [ -n "$pidfile" ]; then
- echo \
- "${name} not running? (check $pidfile)."
- else
- echo "${name} not running?"
- fi
- exit 1
- fi
- echo "Reloading ${name} config files."
- if ! eval $_precmd && [ -z "$_rc_force_run" ]; then
- return 1
- fi
- _doit=\
-"${_user:+su -m $_user -c '}kill -${sig_reload:-HUP} $_pid${_user:+'}"
- eval $_doit
- ;;
-
- restart)
- if ! eval $_precmd && [ -z "$_rc_force_run" ]; then
- return 1
- fi
- # prevent restart being called more
- # than once by any given script
- #
- if [ -n "$_rc_restart_done" ]; then
- return 0
- fi
- _rc_restart_done=YES
- ( $0 ${_rc_force_run:+force}stop )
- sleep 1
- $0 ${_rc_force_run:+force}start
-
- ;;
-
- rcvar)
- echo "# $name"
- if [ -n "$rcvar" ]; then
- if checkyesno ${rcvar}; then
- echo "\$${rcvar}=YES"
- else
- echo "\$${rcvar}=NO"
- fi
- fi
- ;;
-
- *)
- rc_usage "$_keywords"
- ;;
-
- esac
- return 0
- done
-
- echo 1>&2 "$0: unknown directive '$_arg'."
- rc_usage "$_keywords"
- exit 1
-}
-
-#
-# run_rc_script file arg
-# Start the script `file' with `arg', and correctly handle the
-# return value from the script. If `file' ends with `.sh', it's
-# sourced into the current environment. Otherwise it's run as
-# a child process.
-#
-# Note: because `.sh' files are sourced into the current environment
-# run_rc_command shouldn't be used because its difficult to ensure
-# that the global variable state before and after the sourcing of
-# the .sh file won't adversely affect other scripts.
-#
-run_rc_script()
-{
- _file=$1
- _arg=$2
- if [ -z "$_file" -o -z "$_arg" ]; then
- err 3 'USAGE: run_rc_script file arg'
- fi
-
- case "$_file" in
- *.sh) # run in current shell
- set $_arg ; . $_file
- ;;
- *) # run in subshell
- ( set $_arg ; . $_file )
- ;;
- esac
-}
-
-#
-# load_rc_config
-# Source in the configuration file for a given command.
-#
-load_rc_config()
-{
- _command=$1
- if [ -z "$_command" ]; then
- err 3 'USAGE: load_rc_config command'
- fi
-
- . /etc/rc.conf
- if [ -f /etc/rc.conf.d/"$_command" ]; then
- . /etc/rc.conf.d/"$_command"
- fi
-}
-
-
-#
-# rc_usage commands
-# Print a usage string for $0, with `commands' being a list of
-# valid commands.
-#
-rc_usage()
-{
- echo -n 1>&2 "Usage: $0 [fast|force]("
-
- _sep=
- for _elem in $*; do
- echo -n 1>&2 "$_sep$_elem"
- _sep="|"
- done
- echo 1>&2 ")"
- exit 1
-}
-
-#
-# err exitval message
-# Display message to stderr and log to the syslog, and exit with exitval.
-#
-err()
-{
- exitval=$1
- shift
-
- logger "$0: ERROR: $*"
- echo 1>&2 "$0: ERROR: $*"
- exit $exitval
-}
-
-#
-# warn message
-# Display message to stderr and log to the syslog.
-#
-warn()
-{
- logger "$0: WARNING: $*"
- echo 1>&2 "$0: WARNING: $*"
-}