Merge remote-tracking branch 'origin/seventeen' into seventeen
[ipfire-2.x.git] / src / installer / dracut-module / run-installer.sh
1 #!/bin/sh
2 #
3 # IPFire Installer RC
4 #
5
6 unattended=0
7 if grep -q "installer.unattended" /proc/cmdline; then
8 unattended=1
9 fi
10
11 # Enable Unicode
12 echo -en '\033%G' && kbd_mode -u
13
14 # Load default console font
15 setfont LatArCyrHeb-16
16
17 # Silence the kernel
18 echo >/proc/sys/kernel/printk "1 4 1 7"
19 echo -n -e "\033[9;0]"
20
21 echo "Starting shells on tty2 and tty3 ..."
22 /usr/local/bin/iowrap /dev/tty2 /bin/bash &
23 /usr/local/bin/iowrap /dev/tty3 /bin/bash &
24
25 echo "Loading Installer..."
26 /bin/bash --login -c "/usr/bin/installer /dev/tty2"
27 ret=$?
28
29 case "${ret}" in
30 139)
31 echo "The installer has crashed. You will be dropped to a debugging shell"
32 /bin/bash --login
33 ;;
34 esac
35
36 # Poweroff after an unattended installation
37 if [ "${unattended}" = "1" ]; then
38 /shutdown poweroff
39 fi
40
41 # Reboot the system
42 /shutdown reboot