X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Fscripts%2Fvserver.start;h=35b544696a0c1410b6796a6ec8bc0ebb186dde97;hb=75385100bedf6d457e88bc2bb942a6f0771b0e06;hp=3dc6795a472c03d409d29e7f28fb6b824232b2b3;hpb=192fd70c0bd5f01ea94b0bccb47ddf47518b5b2f;p=util-vserver.git diff --git a/util-vserver/scripts/vserver.start b/util-vserver/scripts/vserver.start index 3dc6795..35b5446 100644 --- a/util-vserver/scripts/vserver.start +++ b/util-vserver/scripts/vserver.start @@ -71,16 +71,30 @@ is_mounted= is_vshelper_init= have_interfaces= startsync_pipe= +have_initcmd= while test "$#" -gt 0; do case "$1" in (--rescue) INITSTYLE=rescue;; - (--rescue-cmd) INITCMD_RESCUE=( $2 ); shift;; - (*) panic $"vserver ... start: unknown option '$1'";; + (--rescue-cmd) + warning $"\ +The '--rescue-cmd' option is deprecated; just add the the initcmd +inclusive its arguments to the cmdline." + INITCMD_RESCUE=( $2 ); + have_initcmd=1 + shift;; + (--) shift; break;; + (-*) panic $"vserver ... start: unknown option '$1'";; + (*) break; esac shift done +if test x"$INITSTYLE" = xrescue -a -z "$have_initcmd" -a "$#" -gt 0; then + INITCMD_RESCUE=( "$@" ) +fi + + set -e trap "cleanup" EXIT @@ -88,7 +102,13 @@ sanityCheck "$VSERVER_DIR" mountRootFS "$VSERVER_DIR" generateOptions "$VSERVER_DIR" + +pushd "$VSERVER_DIR" >/dev/null execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" prepre-start +popd >/dev/null + +setDiskLimits "$VSERVER_DIR" + enableInterfaces "$VSERVER_DIR" && have_interfaces=1 mountVserver "$VSERVER_DIR" && is_mounted=1 @@ -104,7 +124,8 @@ pushd "$VSERVER_DIR"/vdir/ >/dev/null is_configured=1 if $_VSERVER_INFO - FEATURE migrate; then ${NICE_CMD[@]} \ - $_CHBIND "${CHBIND_OPTS[@]}" -- \ + $_CHBIND "${CHBIND_OPTS[@]}" -- \ + $_EXEC_ULIMIT "$VSERVER_DIR"/ulimits \ $_VCONTEXT --create "${OPTS_VCONTEXT_CREATE[@]}" -- \ ${USE_VNAMESPACE:+$_VNAMESPACE --set -- } \ $_VLIMIT --dir "$VSERVER_DIR"/rlimits --missingok -- \