]> git.ipfire.org Git - ipfire-2.x.git/blame - 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
CommitLineData
5fca8d27 1#!/bin/sh
6cf9e770
AF
2#
3# IPFire Installer RC
4#
5
c5a5b13e
MT
6unattended=0
7if grep -q "installer.unattended" /proc/cmdline; then
8 unattended=1
9fi
10
27944cdc
MT
11# Mount efivarfs on EFI systems
12if [ -d "/sys/firmware/efi" ]; then
13 mount -t efivarfs efivarfs /sys/firmware/efi/efivars
14fi
15
e6f71226
MT
16# Enable Unicode
17echo -en '\033%G' && kbd_mode -u
18
19# Load default console font
66c684fa 20setfont latarcyrheb-sun16
e6f71226 21
5fca8d27 22# Silence the kernel
6cf9e770
AF
23echo >/proc/sys/kernel/printk "1 4 1 7"
24echo -n -e "\033[9;0]"
25
6cf9e770
AF
26echo "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
30echo "Loading Installer..."
5fca8d27 31/bin/bash --login -c "/usr/bin/installer /dev/tty2"
39a36d7d 32ret=$?
5fca8d27 33
39a36d7d 34case "${ret}" in
a046e8a6 35 139)
39a36d7d
MT
36 echo "The installer has crashed. You will be dropped to a debugging shell"
37 /bin/bash --login
38 ;;
39esac
6cf9e770 40
c5a5b13e
MT
41# Poweroff after an unattended installation
42if [ "${unattended}" = "1" ]; then
43 /shutdown poweroff
44fi
45
5fca8d27
MT
46# Reboot the system
47/shutdown reboot