]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
installer: Drop user to an emergency shell if the installer crashes.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 12 Aug 2014 12:58:13 +0000 (14:58 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 12 Aug 2014 12:58:13 +0000 (14:58 +0200)
src/installer/dracut-module/run-installer.sh

index 53f7cd331479478b546d29d5112c0281b6051d8d..d0611ce37c208dc0fe0deefe8ba347cc42fe5e93 100644 (file)
@@ -13,8 +13,17 @@ echo "Starting shells on tty2 and tty3 ..."
 
 echo "Loading Installer..."
 /bin/bash --login -c "/usr/bin/installer /dev/tty2"
+ret=$?
 
-sleep 60
+case "${ret}" in
+       0)
+               # The installer has finished without a problem.
+               ;;
+       *)
+               echo "The installer has crashed. You will be dropped to a debugging shell"
+               /bin/bash --login
+               ;;
+esac
 
 # Reboot the system
 /shutdown reboot