X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fvserver.functions;h=5bfda352a6a890d83a4f4ad36586546d94ff41f7;hb=8314751ea70853c629cbfc1c8f3ce2ea9647de3f;hp=ce50c3bc38541728b6f1795c6a25a8213432b3e3;hpb=c5cae3de8fe4129170f66414a04ddd9e6f118ae3;p=util-vserver.git diff --git a/scripts/vserver.functions b/scripts/vserver.functions index ce50c3b..5bfda35 100644 --- a/scripts/vserver.functions +++ b/scripts/vserver.functions @@ -278,6 +278,11 @@ function _generateInitOptions INITCMD_STOP=( "$i" "$RUNLEVEL_STOP" ) done INITCMD_PREPARE=( $_FAKE_RUNLEVEL "$RUNLEVEL_START" /var/run/utmp ) + OPTS_ENV=( "${OPTS_ENV[@]}" PREVLEVEL=N RUNLEVEL="$RUNLEVEL_START" ) + if test -n "$OPTION_DEBUG_SYSV"; then + INITCMD_START=( /bin/bash -x "${INITCMD_START[@]}" ) + INITCMD_STOP=( /bin/bash -x "${INITCMD_STOP[@]}" ) + fi ;; (xplain) @@ -690,7 +695,7 @@ function prepareStop pushd "$1/vdir" >/dev/null case "$INITSTYLE" in (sysv) - export PREVLEVEL=$RUNLEVEL_START # required by Debian's initscripts + export PREVLEVEL=$RUNLEVEL_START RUNLEVEL=$RUNLEVEL_STOP # required by Debian's initscripts ;; esac "${STOPCMD_PREPARE[@]}"