]> git.pld-linux.org Git - packages/util-vserver.git/blobdiff - vservers.init
- rel 3
[packages/util-vserver.git] / vservers.init
index 356beb168e946c58e18f5552fd4e94ef6d5c4de1..0c0a60b5c4b1e2bedb049d8cda25bfe0b9e040ba 100644 (file)
@@ -7,14 +7,14 @@
 #              This script does not care for vservers not started by it
 #
 # Copyright 1999-2004 Gentoo Foundation
-# Modified for PLD by Jan Rêkorajski <baggins@pld-linux.org>
+# Modified for PLD by Jan Rękorajski <baggins@pld-linux.org>
 # Distributed under the terms of the GNU General Public License v2
 #
 
 # Source function library
 . /etc/rc.d/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
@@ -41,7 +41,7 @@ _tellResult()
 case "$1" in
 start)
        if [ ! -f /var/lock/subsys/vprocunhide ]; then
-               echo "Run \"/etc/rc.d/init.d/vprocunhide start\" first"
+               echo "Run \"/sbin/service vprocunhide start\" first"
                exit 1
        fi
 
@@ -86,7 +86,11 @@ start)
        touch /var/lock/subsys/vservers
        ;;
 stop)
-       for VSERVER in $START_VSERVERS; do
+       __STOP_VSERVERS=
+       for __V in $START_VSERVERS; do
+               __STOP_VSERVERS="$__V $__STOP_VSERVERS"
+       done
+       for VSERVER in $__STOP_VSERVERS; do
                if [ ! -f /var/lock/subsys/vserver-$VSERVER ]; then
                        echo "Vserver '$VSERVER' is not running"
                        continue
@@ -111,7 +115,11 @@ stop)
                        echo "All types of vservers are not running"
                fi
        else
-               for MARK in $MARKS; do
+               __STOP_MARKS=
+               for __V in $MARKS; do
+                       __STOP_MARKS="$__V $__STOP_MARKS"
+               done
+               for MARK in $__STOP_MARKS; do
                        if [ ! -f /var/lock/subsys/vservers-$MARK ]; then
                                echo "Vservers of type '$MARK' are not running"
                                continue
@@ -153,8 +161,8 @@ status)
        /usr/sbin/vserver-stat
        ;;
 *)
-       echo "Usage: $0 {start|stop|status}"
-       exit 1
+       msg_usage "$0 {start|stop|status}"
+       exit 3
        ;;
 esac
 
This page took 0.029044 seconds and 4 git commands to generate.