X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fvserver.start;h=0f3664231f65c4cec19acba0a9e2b3af98d39b44;hb=da00467717303bf7c7f584af0572b5df6182e3a3;hp=7cdf63befc45d7e339ece84ff4c82be3983cf4b8;hpb=58df27cf3be8958d7a053fcbdddf93cd23a14ca9;p=util-vserver.git diff --git a/scripts/vserver.start b/scripts/vserver.start index 7cdf63b..0f36642 100644 --- a/scripts/vserver.start +++ b/scripts/vserver.start @@ -60,6 +60,7 @@ Failed to start vserver '$VSERVER_NAME'" test -n "$OPTION_DEBUG" || exec 2>/dev/null >/dev/null test -z "$is_mounted" || umountVserver "$VSERVER_DIR" || : test -z "$have_interfaces" || disableInterfaces "$VSERVER_DIR" || : + test -z "$have_cgroup" || destroyCgroup "$VSERVER_DIR" || : unlock || : } @@ -72,6 +73,7 @@ is_vshelper_init= have_interfaces= startsync_pipe= have_initcmd= +have_cgroup= while test "$#" -gt 0; do case "$1" in @@ -121,7 +123,7 @@ enableInterfaces "$VSERVER_DIR" && have_interfaces=1 mountVserver "$VSERVER_DIR" && is_mounted=1 prepareInit "$VSERVER_DIR" addtoCPUSET "$VSERVER_DIR" -attachToCgroup "$VSERVER_DIR" +attachToCgroup "$VSERVER_DIR" && have_cgroup=1 handleDeviceMap --set "$S_CONTEXT" "$VSERVER_DIR/apps/vdevmap" @@ -156,7 +158,7 @@ if $_VSERVER_INFO - FEATURE migrate; then $_VATTRIBUTE --set "${OPTS_VATTRIBUTE[@]}" -- \ $_SAVE_CTXINFO "$VSERVER_DIR" \ $_ENV -i "${OPTS_ENV[@]}" \ - $_VCONTEXT --migrate-self --endsetup $OPT_VCONTEXT_CHROOT $SILENT_OPT \ + $_VCONTEXT --migrate-self --endsetup $OPT_VCONTEXT_CHROOT $OPT_VCONTEXT_CLOSE_FD $SILENT_OPT \ "${OPTS_VCONTEXT_MIGRATE[@]}" "${OPTS_VCONTEXT_ENTER[@]}" -- \ "${INITCMD_START[@]}" else