summaryrefslogtreecommitdiff
path: root/sbin/rc
diff options
context:
space:
mode:
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