summaryrefslogtreecommitdiff
path: root/sbin/rc
diff options
context:
space:
mode:
authorChristian Heim <phreak@gentoo.org>2006-02-06 11:15:46 +0000
committerChristian Heim <phreak@gentoo.org>2006-02-06 11:15:46 +0000
commit72181598d2f778f6988ffd2145f23f20a587c263 (patch)
tree08abcd896637c7df896f967073bd826a6d301b9d /sbin/rc
parentMerging r1832 (diff)
downloadbaselayout-vserver-72181598d2f778f6988ffd2145f23f20a587c263.tar.gz
baselayout-vserver-72181598d2f778f6988ffd2145f23f20a587c263.tar.bz2
baselayout-vserver-72181598d2f778f6988ffd2145f23f20a587c263.zip
Merging r1851
svn path=/baselayout-vserver/trunk/; revision=228
Diffstat (limited to 'sbin/rc')
-rwxr-xr-xsbin/rc18
1 files changed, 18 insertions, 0 deletions
diff --git a/sbin/rc b/sbin/rc
index 6527d16..eb4a78d 100755
--- a/sbin/rc
+++ b/sbin/rc
@@ -27,6 +27,21 @@ get_critical_services() {
return 0
}
+# void check_critical_services()
+#
+# Ensure that critical services are in the boot runlevel
+#
+check_critical_services() {
+ local x
+
+ for x in ${CRITICAL_SERVICES} ; do
+ if [[ ! -L "/etc/runlevels/${BOOTLEVEL}/${x}" ]] ; then
+ ewarn "WARNING: Adding critical service ${x} to the ${BOOTLEVEL} runlevel"
+ ln -snf "/etc/init.d/${x}" "/etc/runlevels/${BOOTLEVEL}/${x}"
+ fi
+ done
+}
+
# Save $1
argv1=$1
@@ -56,6 +71,9 @@ then
argv1="${BOOTLEVEL}"
fi
+# Ensure all critical services have are in the boot runlevel
+get_critical_services
+check_critical_services
source "${svclib}/sh/rc-services.sh"
if [[ -f "${svcdir}/softlevel" ]] ; then