summaryrefslogtreecommitdiffstats
path: root/etc/rc
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2005-04-29 23:02:56 +0000
committerbrooks <brooks@FreeBSD.org>2005-04-29 23:02:56 +0000
commit02891f1c55fa404da07d9fecfbd859b48ab3a2f7 (patch)
tree249bfb21e35a4890089a544e00c3e48a83fa148a /etc/rc
parentf72e92f1b17fcf238bbfedf24af2d5afb0f24928 (diff)
downloadFreeBSD-src-02891f1c55fa404da07d9fecfbd859b48ab3a2f7.zip
FreeBSD-src-02891f1c55fa404da07d9fecfbd859b48ab3a2f7.tar.gz
To allow /etc to be as minimal as possible in a diskless setup, we need
to run initdiskless before we run rcorder on /etc/rc.d. To allow this, move /etc/rc.d/initdiskless to /etc/rc.initdiskless and run it directly from /etc/rc. Remove /etc/rc.d/preseedrandom as it is no longer necessicary (we start with entropy unblocked) and was only used by initdiskless when it was needed. Discussed on: freebsd-rc Repocopy by: peter
Diffstat (limited to 'etc/rc')
-rw-r--r--etc/rc5
1 files changed, 5 insertions, 0 deletions
diff --git a/etc/rc b/etc/rc
index ffd4848..bc2e6f9 100644
--- a/etc/rc
+++ b/etc/rc
@@ -65,6 +65,11 @@ else
_boot="start"
fi
+dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null`
+if [ ${dlv:=0} -ne 0 -o -f /etc/diskless ]; then
+ sh /etc/rc.initdiskless
+fi
+
skip="-s nostart"
[ `/sbin/sysctl -n security.jail.jailed` -eq 1 ] && skip="$skip -s nojail"
files=`rcorder ${skip} /etc/rc.d/* 2>/dev/null`
OpenPOWER on IntegriCloud