diff options
author | Christian Heim <phreak@gentoo.org> | 2006-03-17 09:51:26 +0000 |
---|---|---|
committer | Christian Heim <phreak@gentoo.org> | 2006-03-17 09:51:26 +0000 |
commit | c5f50782079ef12a6e1649638c92f25eccab35ce (patch) | |
tree | 4f247f6f11f9785d8296a2d91a5493d0550384a7 /sbin/runscript.sh | |
parent | Merging r1943 (diff) | |
download | baselayout-vserver-c5f50782079ef12a6e1649638c92f25eccab35ce.tar.gz baselayout-vserver-c5f50782079ef12a6e1649638c92f25eccab35ce.tar.bz2 baselayout-vserver-c5f50782079ef12a6e1649638c92f25eccab35ce.zip |
Merging r1948
svn path=/baselayout-vserver/trunk/; revision=290
Diffstat (limited to 'sbin/runscript.sh')
-rwxr-xr-x | sbin/runscript.sh | 10 |
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 |