fixed migrate vs. migrate-self
[util-vserver.git] / util-vserver / scripts / vserver.start
index f4b4b81..3973e1a 100644 (file)
@@ -22,9 +22,10 @@ fi
 
 function cleanup()
 {
+    test    "$OPTION_DEBUG"    || exec 2>/dev/null >/dev/null
     test -z "$is_started"      || return 0
-    test -z "$is_mounted"      || umountVserver     "$VSERVER_DIR" &>/dev/null || :
-    test -z "$have_interfaces" || disableInterfaces "$VSERVER_DIR" &>/dev/null || :
+    test -z "$is_mounted"      || umountVserver     "$VSERVER_DIR" || :
+    test -z "$have_interfaces" || disableInterfaces "$VSERVER_DIR" || :
 }
 
 is_started=
@@ -52,6 +53,7 @@ if $_VSERVER_INFO - FEATURE migrate; then
     ${USE_VNAMESPACE:+$_VNAMESPACE --set -- } \
     $_VLIMIT     --dir "$VSERVER_DIR"/rlimits --missingok -- \
     $_VUNAME     --dir "$VSERVER_DIR"/uts     --missingok -- \
+    $_VUNAME     --set --context -- "$VSERVER_DIR" \
     $_VATTRIBUTE --set "${OPTS_VATTRIBUTE[@]}" -- \
     $_VCONTEXT   --migrate-self --chroot $SILENT_OPT "${OPTS_VCONTEXT_MIGRATE[@]}" -- \
     "${INITCMD_START[@]}"