fixed path of default-uri file
[util-vserver.git] / util-vserver / scripts / vserver.stop
index 396da71..8a5c5a2 100644 (file)
 
 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,10 +34,10 @@ 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[@]}"
-"$_CTX_KILL" -c "$S_CONTEXT" -- "${INITKILL_SEQ[@]}"
+sendKillSequence  "$S_CONTEXT" "${INITKILL_SEQ[@]}"
 
 execScriptlets    "$VSERVER_DIR" "$VSERVER_NAME" post-stop