summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-01-23 12:17:50 +0000
committerRoy Marples <roy@marples.name>2008-01-23 12:17:50 +0000
commit8793fb8d4c1f134a2e341cc921d5f8e17869483b (patch)
treef438939177c06c9187fcf295a627cef406607191 /sh
parent2fa0b9184d1829c79c7b5e81dd9487f907e5f7cd (diff)
downloadopenrc-8793fb8d4c1f134a2e341cc921d5f8e17869483b.tar.gz
openrc-8793fb8d4c1f134a2e341cc921d5f8e17869483b.tar.bz2
openrc-8793fb8d4c1f134a2e341cc921d5f8e17869483b.tar.xz
No need to specify SVCNAME anymore.
Diffstat (limited to 'sh')
-rwxr-xr-xsh/runscript.sh11
1 files changed, 5 insertions, 6 deletions
diff --git a/sh/runscript.sh b/sh/runscript.sh
index efa40f1..99ae312 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