Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc/rc.d * add new dummy dependancy `NETWORK' to be REQUIREd...
details: https://anonhg.NetBSD.org/src/rev/78d929e6dea8
branches: trunk
changeset: 495302:78d929e6dea8
user: lukem <lukem%NetBSD.org@localhost>
date: Wed Jul 26 00:11:48 2000 +0000
description:
* add new dummy dependancy `NETWORK' to be REQUIREd by services which need
networking to be operational before starting, and use as appropriate.
NETWORK depends upon network and dhclient.
* move the guts of systemfs into mountcritlocal
* replace the dependancy on systemfs with mountcritremote, and remove the
former.
* SERVERS now also depends upon ppp
Notes:
* dhclient (and others) needs /var to be a $critical_filesystem_beforenet
* dhclient now starts before syslogd (because the latter needs /usr, and
/usr might need dhclient to be mounted)
Should fix PRs:
[install/9853] [bin/10002] [misc/10349] [port-i386/10633] [misc/10641]
diffstat:
etc/rc.d/Makefile | 12 ++++++------
etc/rc.d/NETWORK | 10 ++++++++++
etc/rc.d/SERVERS | 4 ++--
etc/rc.d/dhclient | 8 ++++++--
etc/rc.d/dmesg | 4 ++--
etc/rc.d/motd | 4 ++--
etc/rc.d/mountcritlocal | 20 ++++++++++++++++++--
etc/rc.d/mountcritremote | 7 +++++--
etc/rc.d/mountd | 4 ++--
etc/rc.d/ntpdate | 4 ++--
etc/rc.d/ppp | 11 ++++++-----
etc/rc.d/pwcheck | 4 ++--
etc/rc.d/rpcbind | 4 ++--
etc/rc.d/sysdb | 4 ++--
etc/rc.d/syslogd | 4 ++--
etc/rc.d/systemfs | 27 ---------------------------
etc/rc.d/virecover | 4 ++--
etc/rc.d/wscons | 4 ++--
18 files changed, 73 insertions(+), 66 deletions(-)
diffs (truncated from 346 to 300 lines):
diff -r ea1034f0a6fe -r 78d929e6dea8 etc/rc.d/Makefile
--- a/etc/rc.d/Makefile Tue Jul 25 23:18:42 2000 +0000
+++ b/etc/rc.d/Makefile Wed Jul 26 00:11:48 2000 +0000
@@ -1,13 +1,13 @@
-# $NetBSD: Makefile,v 1.7 2000/06/13 16:29:54 itojun Exp $
+# $NetBSD: Makefile,v 1.8 2000/07/26 00:11:48 lukem Exp $
-FILES= DAEMON LOGIN SERVERS accounting amd apmd bootparams bootconf.sh ccd \
- cleartmp cron dhclient dhcpd dhcrelay dmesg fsck.sh gated inetd \
- ipfilter ipmon ipnat ipsec kerberos ldconfig lkm1 lkm2 lkm3 local \
- lpd mopd \
+FILES= DAEMON LOGIN NETWORK SERVERS accounting amd apmd bootparams \
+ bootconf.sh ccd cleartmp cron dhclient dhcpd dhcrelay dmesg fsck.sh \
+ gated inetd ipfilter ipmon ipnat ipsec kerberos ldconfig lkm1 lkm2 \
+ lkm3 local lpd mopd \
motd mountall mountcritlocal mountcritremote mountd mrouted named \
network nfsd nfslocking ntpd ntpdate rpcbind postfix ppp pwcheck quota \
raidframe rarpd rbootd root route6d routed rtadvd rtsold rwho savecore \
- screenblank sendmail swap1 swap2 sysdb sysctl syslogd systemfs timed \
+ screenblank sendmail swap1 swap2 sysdb sysctl syslogd timed \
ttys virecover wscons xdm xfs ypbind yppasswdd ypserv
FILESDIR= /etc/rc.d
FILESMODE= ${BINMODE}
diff -r ea1034f0a6fe -r 78d929e6dea8 etc/rc.d/NETWORK
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/rc.d/NETWORK Wed Jul 26 00:11:48 2000 +0000
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# $NetBSD: NETWORK,v 1.1 2000/07/26 00:11:49 lukem Exp $
+#
+
+# PROVIDE: NETWORK
+# REQUIRE: network dhclient
+
+# This is a dummy dependancy, for services which require networking
+# to be operational before starting.
diff -r ea1034f0a6fe -r 78d929e6dea8 etc/rc.d/SERVERS
--- a/etc/rc.d/SERVERS Tue Jul 25 23:18:42 2000 +0000
+++ b/etc/rc.d/SERVERS Wed Jul 26 00:11:48 2000 +0000
@@ -1,10 +1,10 @@
#!/bin/sh
#
-# $NetBSD: SERVERS,v 1.1 2000/03/13 04:03:54 lukem Exp $
+# $NetBSD: SERVERS,v 1.2 2000/07/26 00:11:49 lukem Exp $
#
# PROVIDE: SERVERS
-# REQUIRE: ipmon savecore syslogd
+# REQUIRE: ipmon ppp savecore syslogd
# This is a dummy dependancy, for early-start servers relying on
# some basic configuration.
diff -r ea1034f0a6fe -r 78d929e6dea8 etc/rc.d/dhclient
--- a/etc/rc.d/dhclient Tue Jul 25 23:18:42 2000 +0000
+++ b/etc/rc.d/dhclient Wed Jul 26 00:11:48 2000 +0000
@@ -1,10 +1,14 @@
#!/bin/sh
#
-# $NetBSD: dhclient,v 1.5 2000/05/26 20:44:17 hubertf Exp $
+# $NetBSD: dhclient,v 1.6 2000/07/26 00:11:49 lukem Exp $
#
# PROVIDE: dhclient
-# REQUIRE: systemfs syslogd
+# REQUIRE: network mountcritlocal
+#
+# 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
diff -r ea1034f0a6fe -r 78d929e6dea8 etc/rc.d/dmesg
--- a/etc/rc.d/dmesg Tue Jul 25 23:18:42 2000 +0000
+++ b/etc/rc.d/dmesg Wed Jul 26 00:11:48 2000 +0000
@@ -1,10 +1,10 @@
#!/bin/sh
#
-# $NetBSD: dmesg,v 1.3 2000/05/13 08:45:06 lukem Exp $
+# $NetBSD: dmesg,v 1.4 2000/07/26 00:11:49 lukem Exp $
#
# PROVIDE: dmesg
-# REQUIRE: systemfs
+# REQUIRE: mountcritremote
. /etc/rc.subr
diff -r ea1034f0a6fe -r 78d929e6dea8 etc/rc.d/motd
--- a/etc/rc.d/motd Tue Jul 25 23:18:42 2000 +0000
+++ b/etc/rc.d/motd Wed Jul 26 00:11:48 2000 +0000
@@ -1,10 +1,10 @@
#!/bin/sh
#
-# $NetBSD: motd,v 1.2 2000/05/13 08:45:07 lukem Exp $
+# $NetBSD: motd,v 1.3 2000/07/26 00:11:49 lukem Exp $
#
# PROVIDE: motd
-# REQUIRE: systemfs
+# REQUIRE: mountcritremote
. /etc/rc.subr
diff -r ea1034f0a6fe -r 78d929e6dea8 etc/rc.d/mountcritlocal
--- a/etc/rc.d/mountcritlocal Tue Jul 25 23:18:42 2000 +0000
+++ b/etc/rc.d/mountcritlocal Wed Jul 26 00:11:48 2000 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: mountcritlocal,v 1.2 2000/05/13 08:45:07 lukem Exp $
+# $NetBSD: mountcritlocal,v 1.3 2000/07/26 00:11:49 lukem Exp $
#
# PROVIDE: mountcritlocal
@@ -9,8 +9,24 @@
. /etc/rc.subr
name="mountcritlocal"
-start_cmd="mount_critical_filesystems local"
+start_cmd="mountcritlocal_start"
stop_cmd=":"
+mountcritlocal_start()
+{
+ # mount critical local filesystems
+ # (as specified in $critical_filesystems_beforenet)
+ #
+ 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 -- *; install -c -m 664 -g utmp /dev/null utmp;
+ })
+}
+
load_rc_config $name
run_rc_command "$1"
diff -r ea1034f0a6fe -r 78d929e6dea8 etc/rc.d/mountcritremote
--- a/etc/rc.d/mountcritremote Tue Jul 25 23:18:42 2000 +0000
+++ b/etc/rc.d/mountcritremote Wed Jul 26 00:11:48 2000 +0000
@@ -1,13 +1,16 @@
#!/bin/sh
#
-# $NetBSD: mountcritremote,v 1.2 2000/05/13 08:45:07 lukem Exp $
+# $NetBSD: mountcritremote,v 1.3 2000/07/26 00:11:49 lukem Exp $
#
# PROVIDE: mountcritremote
-# REQUIRE: root mountcritlocal network
+# REQUIRE: NETWORK root mountcritlocal
. /etc/rc.subr
+# mount critical remote filesystems
+# (as specified in $critical_filesystems)
+#
name="mountcritremote"
start_cmd="mount_critical_filesystems remote"
stop_cmd=":"
diff -r ea1034f0a6fe -r 78d929e6dea8 etc/rc.d/mountd
--- a/etc/rc.d/mountd Tue Jul 25 23:18:42 2000 +0000
+++ b/etc/rc.d/mountd Wed Jul 26 00:11:48 2000 +0000
@@ -1,10 +1,10 @@
#!/bin/sh
#
-# $NetBSD: mountd,v 1.6 2000/06/02 22:54:11 fvdl Exp $
+# $NetBSD: mountd,v 1.7 2000/07/26 00:11:49 lukem Exp $
#
# PROVIDE: mountd
-# REQUIRE: mountall beforemountlkm network rpcbind quota
+# REQUIRE: NETWORK mountall beforemountlkm rpcbind quota
. /etc/rc.subr
diff -r ea1034f0a6fe -r 78d929e6dea8 etc/rc.d/ntpdate
--- a/etc/rc.d/ntpdate Tue Jul 25 23:18:42 2000 +0000
+++ b/etc/rc.d/ntpdate Wed Jul 26 00:11:48 2000 +0000
@@ -1,10 +1,10 @@
#!/bin/sh
#
-# $NetBSD: ntpdate,v 1.3 2000/05/13 08:45:07 lukem Exp $
+# $NetBSD: ntpdate,v 1.4 2000/07/26 00:11:49 lukem Exp $
#
# PROVIDE: ntpdate
-# REQUIRE: syslogd network
+# REQUIRE: NETWORK syslogd
. /etc/rc.subr
diff -r ea1034f0a6fe -r 78d929e6dea8 etc/rc.d/ppp
--- a/etc/rc.d/ppp Tue Jul 25 23:18:42 2000 +0000
+++ b/etc/rc.d/ppp Wed Jul 26 00:11:48 2000 +0000
@@ -1,13 +1,14 @@
#!/bin/sh
#
-# $NetBSD: ppp,v 1.2 2000/05/13 08:45:08 lukem Exp $
+# $NetBSD: ppp,v 1.3 2000/07/26 00:11:49 lukem Exp $
#
-# should provide `network' perhaps?
# PROVIDE: ppp
-# note that this means that syslogd will not be listening on
-# any PPP addresses. this is considered a feature.
-# REQUIRE: systemfs syslogd
+# REQUIRE: mountcritremote syslogd
+#
+# Note that this means that syslogd will not be listening on
+# any PPP addresses. This is considered a feature.
+#
. /etc/rc.subr
diff -r ea1034f0a6fe -r 78d929e6dea8 etc/rc.d/pwcheck
--- a/etc/rc.d/pwcheck Tue Jul 25 23:18:42 2000 +0000
+++ b/etc/rc.d/pwcheck Wed Jul 26 00:11:48 2000 +0000
@@ -1,10 +1,10 @@
#!/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: systemfs syslogd
+# REQUIRE: mountcritremote syslogd
. /etc/rc.subr
diff -r ea1034f0a6fe -r 78d929e6dea8 etc/rc.d/rpcbind
--- a/etc/rc.d/rpcbind Tue Jul 25 23:18:42 2000 +0000
+++ b/etc/rc.d/rpcbind Wed Jul 26 00:11:48 2000 +0000
@@ -1,10 +1,10 @@
#!/bin/sh
#
-# $NetBSD: rpcbind,v 1.3 2000/06/09 14:14:44 fvdl Exp $
+# $NetBSD: rpcbind,v 1.4 2000/07/26 00:11:49 lukem Exp $
#
# PROVIDE: rpcbind
-# REQUIRE: network ntpdate syslogd named ppp
+# REQUIRE: NETWORK ntpdate syslogd named ppp
. /etc/rc.subr
diff -r ea1034f0a6fe -r 78d929e6dea8 etc/rc.d/sysdb
--- a/etc/rc.d/sysdb Tue Jul 25 23:18:42 2000 +0000
+++ b/etc/rc.d/sysdb Wed Jul 26 00:11:48 2000 +0000
@@ -1,10 +1,10 @@
#!/bin/sh
#
-# $NetBSD: sysdb,v 1.2 2000/05/13 08:45:09 lukem Exp $
+# $NetBSD: sysdb,v 1.3 2000/07/26 00:11:49 lukem Exp $
#
# PROVIDE: databases
-# REQUIRE: systemfs
+# REQUIRE: mountcritremote
. /etc/rc.subr
diff -r ea1034f0a6fe -r 78d929e6dea8 etc/rc.d/syslogd
--- a/etc/rc.d/syslogd Tue Jul 25 23:18:42 2000 +0000
+++ b/etc/rc.d/syslogd Wed Jul 26 00:11:48 2000 +0000
@@ -1,10 +1,10 @@
#!/bin/sh
#
-# $NetBSD: syslogd,v 1.4 2000/05/14 13:12:11 tron Exp $
+# $NetBSD: syslogd,v 1.5 2000/07/26 00:11:49 lukem Exp $
#
# PROVIDE: syslogd
-# REQUIRE: systemfs wscons
+# REQUIRE: mountcritremote wscons
. /etc/rc.subr
diff -r ea1034f0a6fe -r 78d929e6dea8 etc/rc.d/systemfs
--- a/etc/rc.d/systemfs Tue Jul 25 23:18:42 2000 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: systemfs,v 1.2 2000/05/13 08:45:09 lukem Exp $
-#
-
-# PROVIDE: systemfs
-# REQUIRE: network mountcritremote
-
-. /etc/rc.subr
-
-name="systemfs"
-start_cmd="systemfs_start"
-stop_cmd=":"
Home |
Main Index |
Thread Index |
Old Index