X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Fscripts%2Fvserver.stop;h=4100a9b5d09c602dd03e51e0da298dcb3117f08c;hb=ba02066b569340ffb5a74184caceeb67fe87ac1c;hp=40198b489d11dfb3fa5eecee7b2c08482dc6f256;hpb=bd0454a515b140c582ce860e1ca218f4569c3287;p=util-vserver.git diff --git a/util-vserver/scripts/vserver.stop b/util-vserver/scripts/vserver.stop index 40198b4..4100a9b 100644 --- a/util-vserver/scripts/vserver.stop +++ b/util-vserver/scripts/vserver.stop @@ -41,25 +41,28 @@ function cleanup sync_fifo= trap "cleanup" EXIT +OPTION_FORCE_SYNC=1 + set -e generateOptions "$VSERVER_DIR" set +e vshelper.doDestroy "$VSERVER_DIR" "$S_CONTEXT" initSync "$VSERVER_DIR" sync_fifo -prepareStop "$VSERVER_DIR" +prepareStop "$VSERVER_DIR" cd "$VSERVER_DIR"/vdir/ -execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" pre-stop +execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" pre-stop cd "$VSERVER_DIR"/vdir/ test -z "$OPTION_DEFAULTTTY" || setDefaultTTY "$VSERVER_DIR" fail= if test -n "$_IS_FAKEINIT" && \ - $_VSERVER_INFO - FEATURE vkill && \ - initpid=$($_VSERVER_INFO "$S_CONTEXT" INITPID 2>/dev/null); then - $_VKILL -s INT -- "$initpid" || fail=1 + $_VSERVER_INFO - FEATURE vkill; then + $_VKILL -s INT --xid "$S_CONTEXT" -- 1 || fail=1 + ## HACK: remove the 'initpid' stuff above when PID virtualization + ## is implemented elif $_VSERVER_INFO - FEATURE migrate; then "${NICE_CMD[@]}" \ ${USE_VNAMESPACE:+$_VNAMESPACE --enter "$S_CONTEXT" -- } \