summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/runscript.sh')
-rwxr-xr-xsbin/runscript.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/sbin/runscript.sh b/sbin/runscript.sh
index 72347bc..2c184c8 100755
--- a/sbin/runscript.sh
+++ b/sbin/runscript.sh
@@ -42,7 +42,7 @@ svcpause="no"
svcrestart="no"
# Functions to handle dependencies and services
-[[ ${RC_GOT_SVCNAMES} != "yes" ]] && source "${svclib}/sh/rc-services.sh"
+[[ ${RC_GOT_SERVICES} != "yes" ]] && source "${svclib}/sh/rc-services.sh"
# Functions to control daemons
[[ ${RC_GOT_DAEMON} != "yes" ]] && source "${svclib}/sh/rc-daemon.sh"
@@ -359,11 +359,12 @@ svc_start() {
if service_inactive "${x}" || service_wasinactive "${x}" || \
[[ -n $(ls "${svcdir}"/scheduled/*/"${x}" 2>/dev/null) ]] ; then
svc_schedule_start "${x}" "${SVCNAME}"
- startinactive="${x}"
+ [[ -n ${startinactive} ]] && startinactive="${startinactive}, "
+ startinactive="${startinactive}${x}"
else
startfail="${x}"
+ break
fi
- break
fi
fi
done
@@ -373,6 +374,9 @@ svc_start() {
eerror " ${SVCNAME} was not started."
retval=1
elif [[ -n ${startinactive} ]] ; then
+ # Change the last , to or for correct grammar.
+ x="${startinactive##*, }"
+ startinactive="${startinactive/%, ${x}/ or ${x}}"
ewarn "WARNING: ${SVCNAME} is scheduled to start when ${startinactive} has started."
retval=1
elif broken "${SVCNAME}" ; then