From 0bf4dcca5084795e416f69a919ec07dc169c434e Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Mon, 5 Jan 2004 22:12:39 +0000 Subject: [PATCH] fixed error-handling git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@545 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- util-vserver/scripts/vserver.stop | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 -- 1.8.1.5