diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-03-02 13:17:05 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-03-02 13:17:05 +0000 |
commit | f61ad9783356ecf0ba424afdc6fdeee280bc4e38 (patch) | |
tree | 6c142a598f265102331931b244090bdfc569ba75 /modules/system/boot/stage-2-init.sh | |
parent | 29d84af677a4909777aaac85b5799534590f95f1 (diff) | |
download | nixpkgs-f61ad9783356ecf0ba424afdc6fdeee280bc4e38.tar nixpkgs-f61ad9783356ecf0ba424afdc6fdeee280bc4e38.tar.gz nixpkgs-f61ad9783356ecf0ba424afdc6fdeee280bc4e38.tar.bz2 nixpkgs-f61ad9783356ecf0ba424afdc6fdeee280bc4e38.tar.lz nixpkgs-f61ad9783356ecf0ba424afdc6fdeee280bc4e38.tar.xz nixpkgs-f61ad9783356ecf0ba424afdc6fdeee280bc4e38.tar.zst nixpkgs-f61ad9783356ecf0ba424afdc6fdeee280bc4e38.zip |
* Run the stage 2 debug shell at a more useful point (just before
starting Upstart). This also causes $PATH to be set to something more sensible. svn path=/nixos/trunk/; revision=32740
Diffstat (limited to 'modules/system/boot/stage-2-init.sh')
-rw-r--r-- | modules/system/boot/stage-2-init.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/system/boot/stage-2-init.sh b/modules/system/boot/stage-2-init.sh index 452e3c99477..ac6193b9962 100644 --- a/modules/system/boot/stage-2-init.sh +++ b/modules/system/boot/stage-2-init.sh @@ -57,6 +57,7 @@ cat /proc/mounts > /etc/mtab # Process the kernel command line. +debug2= for o in $(cat /proc/cmdline); do case $o in debugtrace) @@ -64,8 +65,7 @@ for o in $(cat /proc/cmdline); do set -x ;; debug2) - echo "Debug shell called from @out@" - exec @shell@ + debug2=1 ;; S|s|single) # !!! argh, can't pass a startup event to Upstart yet. @@ -166,7 +166,10 @@ export MODULE_DIR=@kernel@/lib/modules/ # For debugging Upstart. -#@shell@ --login < /dev/console > /dev/console 2>&1 & +if [ -n "$debug2" ]; then + echo "Debug shell called from @out@" + @shell@ +fi # Start Upstart's init. |