3 # description: Wrapper to start the default vservers
5 . /etc/init.d/functions
7 [ -n "$UTIL_VSERVER_VARS" ] || UTIL_VSERVER_VARS=/usr/lib/util-vserver/util-vserver-vars
8 if [ ! -e "$UTIL_VSERVER_VARS" ] ; then
9 echo "Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
12 . "$UTIL_VSERVER_VARS"
14 [ -n "$MARK" ] || MARK=default
15 [ -n "$NUMPARALLEL" ] || NUMPARALLEL=6
30 if [ ! -f /var/lock/subsys/vservers-$MARK ] ; then
31 show "Starting vservers of type '$MARK'"
33 $_START_VSERVERS -m "$MARK" -j "$NUMPARALLEL" --all --start
36 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/vservers-$MARK
38 msg_already_running "vservers of type '$MARK'"
42 if [ -f /var/lock/subsys/vservers-$MARK ] ; then
43 show "Stopping vservers of type '$MARK'"
45 $_START_VSERVERS -m "$MARK" -j "$NUMPARALLEL" --all --stop
48 rm -f /var/lock/subsys/vservers-$MARK
50 msg_not_running "vservers of type '$MARK'"
59 if [ -f /var/lock/subsys/vservers-$MARK ] ; then
60 echo "vservers of type '$MARK' were started"
62 echo "vservers of type '$MARK' are not started"
66 echo "Usage: $0 {start|stop|restart|status}"
73 # This must be last line !
74 # vi:syntax=sh:tw=78:ts=8:sw=4