From 993cec31de8c550802ff6e570b2bcf3c032339f6 Mon Sep 17 00:00:00 2001 From: des Date: Mon, 2 Apr 2007 22:53:07 +0000 Subject: 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 --- etc/defaults/rc.conf | 2 +- etc/rc | 2 +- etc/rc.d/FILESYSTEMS | 12 ++++++++++++ etc/rc.d/Makefile | 2 +- etc/rc.d/addswap | 2 +- etc/rc.d/adjkerntz | 2 +- etc/rc.d/bootconf.sh | 2 +- etc/rc.d/cleanvar | 2 +- etc/rc.d/geli2 | 2 +- etc/rc.d/hostname | 2 +- etc/rc.d/ip6addrctl | 2 +- etc/rc.d/ipfilter | 2 +- etc/rc.d/ipmon | 2 +- etc/rc.d/ipsec | 2 +- etc/rc.d/isdnd | 2 +- etc/rc.d/kldxref | 2 +- etc/rc.d/mountcritremote | 2 +- etc/rc.d/netif | 2 +- etc/rc.d/pf | 2 +- etc/rc.d/pflog | 2 +- etc/rc.d/pfsync | 2 +- etc/rc.d/power_profile | 2 +- etc/rc.d/var | 2 +- 23 files changed, 34 insertions(+), 22 deletions(-) create mode 100644 etc/rc.d/FILESYSTEMS diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 24e50a4..4f98ae6 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -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. diff --git a/etc/rc b/etc/rc index ea8fe68..144e3c9 100644 --- a/etc/rc +++ b/etc/rc @@ -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 diff --git a/etc/rc.d/FILESYSTEMS b/etc/rc.d/FILESYSTEMS new file mode 100644 index 0000000..cff420e --- /dev/null +++ b/etc/rc.d/FILESYSTEMS @@ -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 /. diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index 5808d9c..aca2e20 100755 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -3,7 +3,7 @@ .include -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 \ diff --git a/etc/rc.d/addswap b/etc/rc.d/addswap index cc012ae..8ca3cf8 100644 --- a/etc/rc.d/addswap +++ b/etc/rc.d/addswap @@ -6,7 +6,7 @@ # # PROVIDE: addswap -# REQUIRE: mountcritlocal +# REQUIRE: FILESYSTEMS # BEFORE: sysctl # KEYWORD: nojail diff --git a/etc/rc.d/adjkerntz b/etc/rc.d/adjkerntz index b420653..77e1e9d 100644 --- a/etc/rc.d/adjkerntz +++ b/etc/rc.d/adjkerntz @@ -4,7 +4,7 @@ # # PROVIDE: adjkerntz -# REQUIRE: mountcritlocal random +# REQUIRE: FILESYSTEMS random # BEFORE: netif # KEYWORD: nojail diff --git a/etc/rc.d/bootconf.sh b/etc/rc.d/bootconf.sh index 662dfae..6694a3f 100755 --- a/etc/rc.d/bootconf.sh +++ b/etc/rc.d/bootconf.sh @@ -5,7 +5,7 @@ # # PROVIDE: bootconf -# REQUIRE: mountcritlocal +# REQUIRE: FILESYSTEMS bootconf_start() { diff --git a/etc/rc.d/cleanvar b/etc/rc.d/cleanvar index b075738..9b708fb 100644 --- a/etc/rc.d/cleanvar +++ b/etc/rc.d/cleanvar @@ -4,7 +4,7 @@ # # PROVIDE: cleanvar -# REQUIRE: mountcritlocal var +# REQUIRE: FILESYSTEMS var . /etc/rc.subr diff --git a/etc/rc.d/geli2 b/etc/rc.d/geli2 index a7802b3..50f13aa 100644 --- a/etc/rc.d/geli2 +++ b/etc/rc.d/geli2 @@ -28,7 +28,7 @@ # # PROVIDE: geli2 -# REQUIRE: mountcritlocal +# REQUIRE: FILESYSTEMS # KEYWORD: nojail . /etc/rc.subr diff --git a/etc/rc.d/hostname b/etc/rc.d/hostname index 913717f..6d0f12e 100644 --- a/etc/rc.d/hostname +++ b/etc/rc.d/hostname @@ -27,7 +27,7 @@ # # PROVIDE: hostname -# REQUIRE: mountcritlocal +# REQUIRE: FILESYSTEMS # BEFORE: netif . /etc/rc.subr diff --git a/etc/rc.d/ip6addrctl b/etc/rc.d/ip6addrctl index 910580e..88e1f99 100644 --- a/etc/rc.d/ip6addrctl +++ b/etc/rc.d/ip6addrctl @@ -4,7 +4,7 @@ # # PROVIDE: ip6addrctl -# REQUIRE: mountcritlocal netif +# REQUIRE: FILESYSTEMS netif # BEFORE: network_ipv6 # KEYWORD: nojail diff --git a/etc/rc.d/ipfilter b/etc/rc.d/ipfilter index ca9ddc8..5446787 100755 --- a/etc/rc.d/ipfilter +++ b/etc/rc.d/ipfilter @@ -5,7 +5,7 @@ # # PROVIDE: ipfilter -# REQUIRE: root mountcritlocal +# REQUIRE: root FILESYSTEMS # BEFORE: netif # KEYWORD: nojail diff --git a/etc/rc.d/ipmon b/etc/rc.d/ipmon index 00d61a5..7bbe23b 100755 --- a/etc/rc.d/ipmon +++ b/etc/rc.d/ipmon @@ -5,7 +5,7 @@ # # PROVIDE: ipmon -# REQUIRE: mountcritlocal hostname sysctl cleanvar ipfilter +# REQUIRE: FILESYSTEMS hostname sysctl cleanvar ipfilter # BEFORE: SERVERS # KEYWORD: nojail diff --git a/etc/rc.d/ipsec b/etc/rc.d/ipsec index eb57fdb..30e7a69 100755 --- a/etc/rc.d/ipsec +++ b/etc/rc.d/ipsec @@ -5,7 +5,7 @@ # # PROVIDE: ipsec -# REQUIRE: root mountcritlocal +# REQUIRE: root FILESYSTEMS # BEFORE: DAEMON mountcritremote # KEYWORD: nojail diff --git a/etc/rc.d/isdnd b/etc/rc.d/isdnd index 60ba1f0..1db3ff6 100644 --- a/etc/rc.d/isdnd +++ b/etc/rc.d/isdnd @@ -7,7 +7,7 @@ # # PROVIDE: isdnd -# REQUIRE: netif mountcritlocal cleanvar +# REQUIRE: netif FILESYSTEMS cleanvar # KEYWORD: nojail . /etc/rc.subr diff --git a/etc/rc.d/kldxref b/etc/rc.d/kldxref index 8663213..936271f 100644 --- a/etc/rc.d/kldxref +++ b/etc/rc.d/kldxref @@ -4,7 +4,7 @@ # # PROVIDE: kldxref -# REQUIRE: root mountcritlocal +# REQUIRE: root FILESYSTEMS # BEFORE: netif # KEYWORD: nojail diff --git a/etc/rc.d/mountcritremote b/etc/rc.d/mountcritremote index 15ea27f..a1b7bdb 100755 --- a/etc/rc.d/mountcritremote +++ b/etc/rc.d/mountcritremote @@ -5,7 +5,7 @@ # # PROVIDE: mountcritremote -# REQUIRE: NETWORKING root mountcritlocal cleanvar ipsec +# REQUIRE: NETWORKING root FILESYSTEMS cleanvar ipsec # KEYWORD: nojail . /etc/rc.subr diff --git a/etc/rc.d/netif b/etc/rc.d/netif index 8e6203d..3b2baab 100644 --- a/etc/rc.d/netif +++ b/etc/rc.d/netif @@ -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 diff --git a/etc/rc.d/pf b/etc/rc.d/pf index 331fe8e..b5c7fda 100644 --- a/etc/rc.d/pf +++ b/etc/rc.d/pf @@ -4,7 +4,7 @@ # # PROVIDE: pf -# REQUIRE: root mountcritlocal netif pflog pfsync +# REQUIRE: root FILESYSTEMS netif pflog pfsync # BEFORE: routing # KEYWORD: nojail diff --git a/etc/rc.d/pflog b/etc/rc.d/pflog index 09a127a..0761813 100644 --- a/etc/rc.d/pflog +++ b/etc/rc.d/pflog @@ -4,7 +4,7 @@ # # PROVIDE: pflog -# REQUIRE: root mountcritlocal netif cleanvar +# REQUIRE: root FILESYSTEMS netif cleanvar # KEYWORD: nojail . /etc/rc.subr diff --git a/etc/rc.d/pfsync b/etc/rc.d/pfsync index e7a0664..ef80b1a 100644 --- a/etc/rc.d/pfsync +++ b/etc/rc.d/pfsync @@ -4,7 +4,7 @@ # # PROVIDE: pfsync -# REQUIRE: root mountcritlocal netif +# REQUIRE: root FILESYSTEMS netif # KEYWORD: nojail . /etc/rc.subr diff --git a/etc/rc.d/power_profile b/etc/rc.d/power_profile index 1b97fab..5b33d70 100644 --- a/etc/rc.d/power_profile +++ b/etc/rc.d/power_profile @@ -9,7 +9,7 @@ # # PROVIDE: power_profile -# REQUIRE: mountcritlocal syslogd +# REQUIRE: FILESYSTEMS syslogd # KEYWORD: nojail nostart . /etc/rc.subr diff --git a/etc/rc.d/var b/etc/rc.d/var index e11b3c7..5e2cde2 100644 --- a/etc/rc.d/var +++ b/etc/rc.d/var @@ -28,7 +28,7 @@ # # PROVIDE: var -# REQUIRE: mountcritlocal +# REQUIRE: FILESYSTEMS . /etc/rc.subr -- cgit v1.1