3 # util-vserver sets the path to vshelper and kills all guest processes
5 # chkconfig: 2345 10 90
6 # description: Sets the path to vshelper and kills all guest processes
8 : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
9 test -e "$UTIL_VSERVER_VARS" || {
10 echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
13 . "$UTIL_VSERVER_VARS"
16 . "$_LIB_VSERVER_INIT_FUNCTIONS"
21 local f="/proc/sys/kernel/vshelper"
23 echo "$_VSHELPER" > "$f"
30 function kill_contexts()
32 for xid in `ls -1 /proc/virtual`; do
33 test "$xid" = "info" -o "$xid" = "status" && continue
34 $_VATTRIBUTE --xid $xid --set --flag ~persistent
35 $_VKILL --xid $xid -s 15
37 $_VKILL --xid $xid -s 9
43 _beginResult $"Setting path to vshelper"
47 test "$retval" -ne 0 || touch "$lockfile"
53 # Stop all running, but non-default guests"
54 _beginResult $"Stopping all running guests"
55 $_START_VSERVERS -j 1 --all --stop
58 _beginResult $"Killing all running contexts"
71 start|stop|restart) $1;;
74 test -f $lockfile && restart || :
77 test -f $lockfile && {
78 echo $"/proc entries were fixed"
81 echo $"/proc entries are not fixed"
85 echo "Usage: $0 {start|stop|reload|restart|condrestart|status}"