diff options
Diffstat (limited to 'sbin')
-rwxr-xr-x | sbin/rc-daemon.sh | 2 | ||||
-rwxr-xr-x | sbin/rc-services.sh | 2 | ||||
-rwxr-xr-x | sbin/runscript.sh | 10 |
3 files changed, 9 insertions, 5 deletions
diff --git a/sbin/rc-daemon.sh b/sbin/rc-daemon.sh index 9f9cd26..81ca457 100755 --- a/sbin/rc-daemon.sh +++ b/sbin/rc-daemon.sh @@ -16,7 +16,7 @@ RC_GOT_DAEMON="yes" [[ ${RC_GOT_FUNCTIONS} != "yes" ]] && source /sbin/functions.sh -[[ ${RC_GOT_SVCNAMES} != "yes" ]] && source "${svclib}/sh/rc-services.sh" +[[ ${RC_GOT_SERVICES} != "yes" ]] && source "${svclib}/sh/rc-services.sh" RC_RETRY_KILL="no" RC_RETRY_TIMEOUT=1 diff --git a/sbin/rc-services.sh b/sbin/rc-services.sh index 2991176..199a8d2 100755 --- a/sbin/rc-services.sh +++ b/sbin/rc-services.sh @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # RC Dependency and misc service functions -RC_GOT_SVCNAMES="yes" +RC_GOT_SERVICES="yes" [[ ${RC_GOT_FUNCTIONS} != "yes" ]] && source /sbin/functions.sh 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 |