From: Enrico Scholz Date: Sun, 10 Apr 2005 00:57:16 +0000 (+0000) Subject: use 'killContext()' instead of invoking 'vkill' manually X-Git-Tag: version_0_30_210~269 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=800a0d6f26dfc081fb03b2aea59c40048777a129;p=util-vserver.git use 'killContext()' instead of invoking 'vkill' manually set an initial runlevel for 'minit' style also set 'async' vshelper method for non-sync mode git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2012 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/scripts/vserver.functions b/util-vserver/scripts/vserver.functions index d999d7e..5877853 100644 --- a/util-vserver/scripts/vserver.functions +++ b/util-vserver/scripts/vserver.functions @@ -186,8 +186,8 @@ function sendKillSequence while isCtxRunning "$ctx"; do test -z "$wait" || sleep "$wait" - - $_VKILL --xid "$ctx" ${1:+-s "$1"} 2>/dev/null || : + + killContext "$ctx" "$1" test -n "$2" || break wait="$2" shift 2 @@ -245,8 +245,9 @@ function _generateInitOptions _IS_FAKEINIT=1 INITCMD_START_SYNC=( "$_INITSYNC_MINIT_START" "$vdir" ) _NEED_VSHELPER_SYNC=1 - test -z "$RUNLEVEL_START" || INITCMD_START=( "${INITCMD_START[@]}" "$RUNLEVEL_START" ) - test -z "$RUNLEVEL_STOP" || INITCMD_STOP=( "${INITCMD_STOP[@]}" "$RUNLEVEL_STOP" ) + test -z "$RUNLEVEL_START" || INITCMD_START=( "${INITCMD_START[@]}" "$RUNLEVEL_START" ) + test -z "$RUNLEVEL_STOP" || INITCMD_STOP=( "${INITCMD_STOP[@]}" "$RUNLEVEL_STOP" ) + ! isNumber "${RUNLEVEL_START:-3}" || INITCMD_PREPARE=( $_FAKE_RUNLEVEL "${RUNLEVEL_START:-3}" /var/run/utmp ) ;; (xgentoo) @@ -722,7 +723,10 @@ function umountVserver ## Usage: waitForSync function initSync { - test -z "$_NEED_VSHELPER_SYNC" || vshelper.initSync "$1" "$2" + local _is_meth=sync + test -n "$_NEED_VSHELPER_SYNC" || _is_meth=async + + vshelper.initSync "$1" "$2" "$_is_meth" } ## Usage: waitForSync []