From: Enrico Scholz Date: Mon, 5 Jan 2004 22:12:39 +0000 (+0000) Subject: fixed error-handling X-Git-Tag: VERSION_0_10~980 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bf4dcca5084795e416f69a919ec07dc169c434e;p=util-vserver.git fixed error-handling git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@545 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/scripts/vserver.stop b/util-vserver/scripts/vserver.stop index 55af27d..8a5c5a2 100644 --- a/util-vserver/scripts/vserver.stop +++ b/util-vserver/scripts/vserver.stop @@ -17,14 +17,15 @@ if ! isVserverRunning "$VSERVER_DIR" S_CONTEXT; then echo $"vserver '$VSERVER_NAME' is not running; aborting..." - umountVserver "$VSERVER_DIR" &>/dev/null || : + umountVserver "$VSERVER_DIR" &>/dev/null || : disableInterfaces "$VSERVER_DIR" &>/dev/null || : exit 1 fi +set -e generateOptions "$VSERVER_DIR" +set +e -set -e cd "$VSERVER_DIR"/vdir/ execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" pre-stop @@ -33,9 +34,9 @@ cd "$VSERVER_DIR"/vdir/ "$_CHBIND" "${CHBIND_OPTS[@]}" \ "$_EXEC_ULIMIT" "$VSERVER_DIR/ulimits" \ "$_CHCONTEXT" "${CHCONTEXT_OPTS[@]}" \ - "$_CAPCHROOT" "${CAPCHROOT_OPTS[@]}" . "${INITCMD_STOP[@]}" + "$_CAPCHROOT" "${CAPCHROOT_OPTS[@]}" . "${INITCMD_STOP[@]}" && \ + "${INITCMD_STOP_SYNC[@]}" || : -"${INITCMD_STOP_SYNC[@]}" sendKillSequence "$S_CONTEXT" "${INITKILL_SEQ[@]}" execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" post-stop