installer: Only drop to a debug shell after a segmentation fault
[ipfire-2.x.git] / src / installer / dracut-module / run-installer.sh
1 #!/bin/sh
2 #
3 # IPFire Installer RC
4 #
5
6 # Enable Unicode
7 echo -en '\033%G' && kbd_mode -u
8
9 # Load default console font
10 setfont LatArCyrHeb-16
11
12 # Silence the kernel
13 echo >/proc/sys/kernel/printk "1 4 1 7"
14 echo -n -e "\033[9;0]"
15
16 echo "Starting shells on tty2 and tty3 ..."
17 /usr/local/bin/iowrap /dev/tty2 /bin/bash &
18 /usr/local/bin/iowrap /dev/tty3 /bin/bash &
19
20 echo "Loading Installer..."
21 /bin/bash --login -c "/usr/bin/installer /dev/tty2"
22 ret=$?
23
24 case "${ret}" in
25 139)
26 echo "The installer has crashed. You will be dropped to a debugging shell"
27 /bin/bash --login
28 ;;
29 esac
30
31 # Reboot the system
32 /shutdown reboot