It looks like vsh was never built due to a makefile bug.
[util-vserver.git] / sysv / vservers.subst
index bad0e49..5f4639f 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# chkconfig: 345 98 10
+# chkconfig: 345 99 01
 # description: The vservers service is used to start and stop all
 #              the virtual servers.
 
@@ -24,8 +24,12 @@ sortserver(){
 startservers(){
        echo "Starting the virtual servers"
        cd /etc/vservers
-       for name in `sortserver`
+       for name in ${*:-`sortserver`}
        do
+               if ! test -f "$name.conf" ; then
+                       echo No configuration for this vserver: /etc/vservers/$name.conf
+                       continue
+               fi
                ONBOOT=
                . $name.conf
                if [ "$ONBOOT" = "yes" ] ; then
@@ -45,25 +49,28 @@ fi
 # See how we were called.
 case "$1" in
   start)
+       shift
        if [ "$BACKGROUND" = "yes" ] ; then
-               startservers >/dev/tty8 </dev/tty8 2>/dev/tty8 &
+               startservers $* >/dev/tty8 </dev/tty8 2>/dev/tty8 &
        else
-               startservers
+               startservers $*
        fi
        touch /var/lock/subsys/vservers
        ;;
   stop)
+       shift
        echo "Stopping the virtual servers"
        cd /etc/vservers
-       for name in `sortserver -r`
+       for name in ${*:-`sortserver -r`}
        do
                $USR_SBIN/vserver $name stop
        done
        rm -f /var/lock/subsys/vservers
        ;;
-  restart)
-       $0 stop
-       $0 start
+  restart|force-reload)
+       shift
+       $0 stop $*
+       $0 start $*
        ;;
   reload)
        echo Not implemented