3 # description: The vservers service is used to start and stop all
6 : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
7 test -e "$UTIL_VSERVER_VARS" || {
8 echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
11 . "$UTIL_VSERVER_VARS"
13 # Print the vserver name in priority/alpha order
19 test -f "$serv" || continue
23 test "$ONBOOT" || continue
24 printf "%03d %s\n" $PRIORITY `basename $serv .conf`
26 ) | sort $* | (while read a b; do echo $b; done)
30 echo "Starting the virtual servers"
32 for name in `sortserver`
36 if [ "$ONBOOT" = "yes" ] ; then
37 $_VSERVER_LEGACY $name start
39 echo virtual server $name not configured for on boot start
45 if [ -f /etc/vservers.conf ] ; then
50 # See how we were called.
53 if [ "$BACKGROUND" = "yes" ] ; then
54 startservers >/dev/tty8 </dev/tty8 2>/dev/tty8 &
58 touch /var/lock/subsys/vservers-legacy
61 echo "Stopping the virtual servers"
63 for name in `sortserver -r`
65 $_VSERVER_LEGACY $name stop
67 rm -f /var/lock/subsys/vservers-legacy
81 name=`basename $serv .conf`
83 echo -n ONBOOT=$ONBOOT " "
84 $_VSERVER_LEGACY $name running
88 echo "Usage: vservers {start|stop|restart|reload|status}"