From ff6a662f6e0824f3fc51c97912a8db615c3822a9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 26 Aug 2008 12:45:36 +0000 Subject: [PATCH] * Fixed some typos, cleaned up the indentation. svn path=/nixos/trunk/; revision=12720 --- boot/boot-stage-1-init.sh | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/boot/boot-stage-1-init.sh b/boot/boot-stage-1-init.sh index dd8047b14efa..de86c4c74f33 100644 --- a/boot/boot-stage-1-init.sh +++ b/boot/boot-stage-1-init.sh @@ -1,33 +1,39 @@ #! @staticShell@ targetRoot=/mnt/root -dialog(){ + + +errorDialog() { timeout=15 echo echo "Press within $timeout seconds:" - echo " f) to switch finally to an interactive shell having pid 1" - echo " (you'll need this to start stage2 / upstart)" - echo " i) to launch an intercative shell" + echo " i) to launch an interactive shell" + echo " f) to start an interactive shell having pid 1" + echo " (needed if you want to start Stage 2 manually)" echo " *) to continue immediately (ignoring the failing command)" read -t $timeout reply case $reply in - f) exec @staticShell@;; - i) echo - echo "Quit interactive shell with exit status of" - echo " 0 : to continue" - echo " non zero : to get this dialog again (eg to switch to interactive shell with pid 1" - @staticShell@ || fail - ;; - *) echo continuing ignoring error;; + f) + exec @staticShell@;; + i) + echo + echo "Quit interactive shell with exit status of" + echo " 0 : to continue" + echo " non-zero : to get this dialog again" + @staticShell@ || fail + ;; + *) + echo continuing ignoring error;; esac } -fail(){ + +fail() { # If starting stage 2 failed, start an interactive shell. echo "error while running Stage 1" echo "Stage 1 should mount the root partition containing the nix store on \`$targetRoot'"; echo - dialog + errorDialog } trap 'fail' ERR;