Add --strace and --debug-sysv options to further debug problems with starting a guest.
[util-vserver.git] / scripts / vserver.functions
index c42e617..5bfda35 100644 (file)
@@ -279,6 +279,10 @@ function _generateInitOptions
            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)