]> git.ipfire.org Git - ipfire-2.x.git/blob - src/installer/dracut-module/run-installer.sh
suricata: Change midstream policy to "pass-flow"
[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 # Mount efivarfs on EFI systems
12 if [ -d "/sys/firmware/efi" ]; then
13 mount -t efivarfs efivarfs /sys/firmware/efi/efivars
14 fi
15
16 # Enable Unicode
17 echo -en '\033%G' && kbd_mode -u
18
19 # Load default console font
20 setfont latarcyrheb-sun16
21
22 # Silence the kernel
23 echo >/proc/sys/kernel/printk "1 4 1 7"
24 echo -n -e "\033[9;0]"
25
26 echo "Starting shells on tty2 and tty3 ..."
27 /usr/local/bin/iowrap /dev/tty2 /bin/bash &
28 /usr/local/bin/iowrap /dev/tty3 /bin/bash &
29
30 echo "Loading Installer..."
31 /bin/bash --login -c "/usr/bin/installer /dev/tty2"
32 ret=$?
33
34 case "${ret}" in
35 139)
36 echo "The installer has crashed. You will be dropped to a debugging shell"
37 /bin/bash --login
38 ;;
39 esac
40
41 # Poweroff after an unattended installation
42 if [ "${unattended}" = "1" ]; then
43 /shutdown poweroff
44 fi
45
46 # Reboot the system
47 /shutdown reboot