Add a dummy script, FILESYSTEMS, which depends on root and mountcritlocal

and takes over mountcritlocal's role as the early / late divider.  This
makes it far easier to add rc scripts which need to run early, such as a
startup script for zfs, which is right around the corner.

This change should be a no-op; I have verified that the only change in
rcorder's output is the insertion of FILESYSTEMS immediately after
mountcritlocal.

MFC after:	3 weeks
This commit is contained in:
Dag-Erling Smørgrav 2007-04-02 22:53:07 +00:00
parent 8841963421
commit 7bd5b79de4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168283
23 changed files with 34 additions and 22 deletions

View File

@ -24,7 +24,7 @@
rc_debug="NO" # Set to YES to enable debugging output from rc.d
rc_info="NO" # Enables display of informational messages at boot.
rcshutdown_timeout="30" # Seconds to wait before terminating rc.shutdown
early_late_divider="mountcritlocal" # Script that separates early/late
early_late_divider="FILESYSTEM" # Script that separates early/late
# stages of the boot process. Make sure you know
# the ramifications if you change this.
# See rc.conf(5) for more details.

2
etc/rc
View File

@ -75,7 +75,7 @@ load_rc_config 'XXX'
skip="-s nostart"
if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then
skip="$skip -s nojail"
if [ "$early_late_divider" = "mountcritlocal" ]; then
if [ "$early_late_divider" = "FILESYSTEMS" ]; then
early_late_divider=NETWORKING
fi
fi

12
etc/rc.d/FILESYSTEMS Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: FILESYSTEMS
# REQUIRE: root mountcritlocal
# This is a dummy dependency, for services which require file systems
# to be mounted before starting. It also serves as the default early /
# late divider; after this point, rc.d directories are rescanned to
# catch scripts from other file systems than /.

View File

@ -3,7 +3,7 @@
.include <bsd.own.mk>
FILES= DAEMON LOGIN NETWORKING SERVERS \
FILES= DAEMON FILESYSTEMS LOGIN NETWORKING SERVERS \
abi accounting addswap adjkerntz amd \
apm apmd archdep atm1 atm2 atm3 auditd auto_linklocal \
bgfsck bluetooth bootparams bridge bsnmpd bthidd \

View File

@ -6,7 +6,7 @@
#
# PROVIDE: addswap
# REQUIRE: mountcritlocal
# REQUIRE: FILESYSTEMS
# BEFORE: sysctl
# KEYWORD: nojail

View File

@ -4,7 +4,7 @@
#
# PROVIDE: adjkerntz
# REQUIRE: mountcritlocal random
# REQUIRE: FILESYSTEMS random
# BEFORE: netif
# KEYWORD: nojail

View File

@ -5,7 +5,7 @@
#
# PROVIDE: bootconf
# REQUIRE: mountcritlocal
# REQUIRE: FILESYSTEMS
bootconf_start()
{

View File

@ -4,7 +4,7 @@
#
# PROVIDE: cleanvar
# REQUIRE: mountcritlocal var
# REQUIRE: FILESYSTEMS var
. /etc/rc.subr

View File

@ -28,7 +28,7 @@
#
# PROVIDE: geli2
# REQUIRE: mountcritlocal
# REQUIRE: FILESYSTEMS
# KEYWORD: nojail
. /etc/rc.subr

View File

@ -27,7 +27,7 @@
#
# PROVIDE: hostname
# REQUIRE: mountcritlocal
# REQUIRE: FILESYSTEMS
# BEFORE: netif
. /etc/rc.subr

View File

@ -4,7 +4,7 @@
#
# PROVIDE: ip6addrctl
# REQUIRE: mountcritlocal netif
# REQUIRE: FILESYSTEMS netif
# BEFORE: network_ipv6
# KEYWORD: nojail

View File

@ -5,7 +5,7 @@
#
# PROVIDE: ipfilter
# REQUIRE: root mountcritlocal
# REQUIRE: root FILESYSTEMS
# BEFORE: netif
# KEYWORD: nojail

View File

@ -5,7 +5,7 @@
#
# PROVIDE: ipmon
# REQUIRE: mountcritlocal hostname sysctl cleanvar ipfilter
# REQUIRE: FILESYSTEMS hostname sysctl cleanvar ipfilter
# BEFORE: SERVERS
# KEYWORD: nojail

View File

@ -5,7 +5,7 @@
#
# PROVIDE: ipsec
# REQUIRE: root mountcritlocal
# REQUIRE: root FILESYSTEMS
# BEFORE: DAEMON mountcritremote
# KEYWORD: nojail

View File

@ -7,7 +7,7 @@
#
# PROVIDE: isdnd
# REQUIRE: netif mountcritlocal cleanvar
# REQUIRE: netif FILESYSTEMS cleanvar
# KEYWORD: nojail
. /etc/rc.subr

View File

@ -4,7 +4,7 @@
#
# PROVIDE: kldxref
# REQUIRE: root mountcritlocal
# REQUIRE: root FILESYSTEMS
# BEFORE: netif
# KEYWORD: nojail

View File

@ -5,7 +5,7 @@
#
# PROVIDE: mountcritremote
# REQUIRE: NETWORKING root mountcritlocal cleanvar ipsec
# REQUIRE: NETWORKING root FILESYSTEMS cleanvar ipsec
# KEYWORD: nojail
. /etc/rc.subr

View File

@ -26,7 +26,7 @@
#
# PROVIDE: netif
# REQUIRE: atm1 ipfilter mountcritlocal serial sppp sysctl
# REQUIRE: atm1 ipfilter FILESYSTEMS serial sppp sysctl
# KEYWORD: nojail
. /etc/rc.subr

View File

@ -4,7 +4,7 @@
#
# PROVIDE: pf
# REQUIRE: root mountcritlocal netif pflog pfsync
# REQUIRE: root FILESYSTEMS netif pflog pfsync
# BEFORE: routing
# KEYWORD: nojail

View File

@ -4,7 +4,7 @@
#
# PROVIDE: pflog
# REQUIRE: root mountcritlocal netif cleanvar
# REQUIRE: root FILESYSTEMS netif cleanvar
# KEYWORD: nojail
. /etc/rc.subr

View File

@ -4,7 +4,7 @@
#
# PROVIDE: pfsync
# REQUIRE: root mountcritlocal netif
# REQUIRE: root FILESYSTEMS netif
# KEYWORD: nojail
. /etc/rc.subr

View File

@ -9,7 +9,7 @@
#
# PROVIDE: power_profile
# REQUIRE: mountcritlocal syslogd
# REQUIRE: FILESYSTEMS syslogd
# KEYWORD: nojail nostart
. /etc/rc.subr

View File

@ -28,7 +28,7 @@
#
# PROVIDE: var
# REQUIRE: mountcritlocal
# REQUIRE: FILESYSTEMS
. /etc/rc.subr