diff options
Diffstat (limited to 'sbin/rc')
-rwxr-xr-x | sbin/rc | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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 |