Use it in stopSleepingGuest, to prevent races and to do proper cleanup.
If vserver ... stop has already been invoked, remove SC_HELPER from the context.
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2704
94cd875c-1c1d-0410-91d2-
eb244daf1a30
function stopSleepingGuest
{
local guest="$1"
- $_VKILL --xid "$guest" -s INT -- 1
+ $_VSERVER "$guest" stop --rescue-init
}
while test "$#" -gt 0; do
case "$1" in
- (--rescue-init) _IS_FAKEINIT=1;;
+ (--rescue-init) shift; _IS_FAKEINIT=1;;
(--) shift; break;;
(-*) panic $"vserver ... stop: unknown option '$1'";;
esac
test -z "$OPTION_DEFAULTTTY" || setDefaultTTY "$VSERVER_DIR"
+$_VATTRIBUTE --set --xid "$S_CONTEXT" --flag !SC_HELPER
+
fail=
initWait "$VSERVER_DIR" "$S_CONTEXT" vwait_statdir
if test -n "$_IS_FAKEINIT" && \