]> git.pld-linux.org Git - packages/util-vserver.git/blobdiff - rebootmgr.init
- up to pre3126
[packages/util-vserver.git] / rebootmgr.init
old mode 100644 (file)
new mode 100755 (executable)
index cae15c6..65eb453
@@ -5,21 +5,17 @@
 #              the /sbin/vreboot command to talk with the reboot manager
 # processname: rebootmgr
 # config: /etc/vservers
-#
-# $Id$
 
 . /etc/init.d/functions
 
-[ -n "$UTIL_VSERVER_VARS" ] || UTIL_VSERVER_VARS=/usr/lib/util-vserver/util-vserver-vars
+[ -n "$UTIL_VSERVER_VARS" ] || UTIL_VSERVER_VARS=/usr/share/util-vserver/util-vserver-vars
 if [ ! -e "$UTIL_VSERVER_VARS" ] ; then
        echo "Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
        exit 1
 fi
 . "$UTIL_VSERVER_VARS"
 
-# See how we were called.
-case "$1" in
-  start)
+start() {
        if [ ! -f /var/lock/subsys/rebootmgr ] ; then
            show "Starting the legacy vserver reboot manager"
            busy
@@ -38,8 +34,9 @@ case "$1" in
        else
            msg_already_running "legacy vserver reboot manager"
        fi
-       ;;
-  stop)
+}
+
+stop() {
        if [ -f /var/lock/subsys/rebootmgr ] ; then
                show "Stopping the legacy vserver reboot manager"
                busy
@@ -50,10 +47,20 @@ case "$1" in
        else
            msg_not_running "legacy vserver reboot manager"
        fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
        ;;
   restart)
-       $0 stop
-       $0 start
+       stop
+       start
        ;;
   status)
        if [ -f /var/run/rebootmgr.pid ] ; then
@@ -69,4 +76,4 @@ case "$1" in
        exit 3
 esac
 
-exit 0
+exit $RETVAL
This page took 0.090161 seconds and 4 git commands to generate.