3 # description: The vservers service is used to start and stop all
9 # Print the vserver name in priority/alpha order
13 for serv in *.conf ; do
14 # XXX - why is this check necessary?
15 test -f "$serv" || continue
18 echo $PRIORITY `basename $serv .conf`
20 ) | sort -n $* | cut -d ' ' -f 2
24 echo "Starting the virtual servers"
27 if ! test -f "$name.conf" ; then
28 echo No configuration for this vserver: /etc/vservers/$name.conf
33 if [ -f /etc/vservers.conf ] ; then
37 if [ "$ONBOOT" = "yes" ] ; then
38 mkdir -p $VROOTDIR/$name/var/log
39 if [ "$BACKGROUND" = "yes" ] ; then
40 nohup setsid $USR_SBIN/vserver $name start >$VROOTDIR/$name/var/log/boot.log 2>&1 </dev/null &
43 $USR_SBIN/vserver $name start 2>&1 </dev/null | tee $VROOTDIR/$name/var/log/boot.log
49 # See how we were called.
52 # do nothing unless passed a vserver name - 'start all' functionality
53 # subsumed by Node Manager
55 touch /var/lock/subsys/vservers
62 echo "Stopping the virtual servers"
64 for name in ${*:-`sortserver -r`} ; do
65 chcontext --ctx `id -u $name` /usr/lib/util-vserver/vserverkillall
66 umount $VROOTDIR/$name/proc
67 umount $VROOTDIR/$name/dev/pts
69 rm -f /var/lock/subsys/vservers
81 for serv in *.conf ; do
83 name=`basename $serv .conf`
85 echo -n ONBOOT=$ONBOOT " "
86 $USR_SBIN/vserver $name running
90 echo "Usage: vservers {start|stop|restart|reload|status}"