]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- grab $ACTION variable
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 21 Apr 2010 20:24:07 +0000 (20:24 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Wed, 21 Apr 2010 20:24:07 +0000 (20:24 +0000)
svn-id: @11340

service

diff --git a/service b/service
index c29c382a442a375e2d947badac68757fd30b7f9b..7e210ee2b84abdd404ac8355b3a93c1633bbd744 100755 (executable)
--- a/service
+++ b/service
@@ -36,15 +36,15 @@ fi
 cd /
 while [ $# -gt 0 ]; do
        case "${1}" in
-         --help | -h | --h* )
+       --help | -h | --h* )
                echo "${USAGE}" >&2
                exit 0
                ;;
-         --version | -V )
+       --version | -V )
                echo "${VERSION}" >&2
                exit 0
                ;;
-         *)
+       *)
                if [ -z "${SERVICE}" -a $# -eq 1 -a "${1}" = "--status-all" ]; then
                        cd ${SERVICEDIR}
                        for SERVICE in *; do
@@ -85,6 +85,8 @@ while [ $# -gt 0 ]; do
                        fi
                elif [ -z "${SERVICE}" ]; then
                        SERVICE="${1}"
+               elif [ -z "${ACTION}" ]; then
+                       ACTION="${1}"
                else
                        OPTIONS="${OPTIONS} ${1}"
                fi
@@ -94,7 +96,7 @@ while [ $# -gt 0 ]; do
 done
 
 if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
-       env -i LANG=$LANG PATH=$PATH TERM=$TERM "${SERVICEDIR}/${SERVICE}" ${OPTIONS}
+       exec env -i LANG=$LANG PATH=$PATH TERM=$TERM "${SERVICEDIR}/${SERVICE}" ${ACTION} ${OPTIONS}
 else
        echo "${SERVICE}: unrecognized service" >&2
        exit 1
This page took 0.039237 seconds and 4 git commands to generate.