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