From 8793fb8d4c1f134a2e341cc921d5f8e17869483b Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 23 Jan 2008 12:17:50 +0000 Subject: No need to specify SVCNAME anymore. --- sh/runscript.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sh/runscript.sh b/sh/runscript.sh index efa40f13..99ae3129 100755 --- a/sh/runscript.sh +++ b/sh/runscript.sh @@ -95,8 +95,8 @@ if [ -n "${command}" ]; then fi if yesno "${start_inactive}"; then local _inactive=false - service_inactive "${SVCNAME}" && _inactive=true - mark_service_inactive "${SVCNAME}" + service_inactive && _inactive=true + mark_service_inactive fi start-stop-daemon --start \ --exec ${command} \ @@ -107,7 +107,7 @@ if [ -n "${command}" ]; then eend $? "Failed to start ${SVCNAME}" && return 0 if yesno "${start_inactive}"; then if ! ${_inactive}; then - mark_service_stopped "${SVCNAME}" + mark_service_stopped fi fi return 1 @@ -153,7 +153,7 @@ while [ -n "$1" ]; do # we can run this command for _cmd in ${extra_started_commands}; do if [ "${_cmd}" = "$1" ]; then - if ! service_started "${SVCNAME}"; then + if ! service_started; then eerror "${SVCNAME}: cannot \`$1' as it has not been started" exit 1 fi @@ -171,8 +171,7 @@ while [ -n "$1" ]; do continue 2 else if [ "${_cmd}" = "start" -o "${_cmd}" = "stop" ]; then - shift - continue 2 + exit 0 else eerror "${SVCNAME}: function \`$1' defined but does not exist" exit 1 -- cgit v1.2.3