]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - 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
index d0611ce37c208dc0fe0deefe8ba347cc42fe5e93..755de1d3a2b9798ea8f44bcd13b535368f0a06eb 100644 (file)
@@ -3,6 +3,22 @@
 # IPFire Installer RC
 #
 
+unattended=0
+if grep -q "installer.unattended" /proc/cmdline; then
+       unattended=1
+fi
+
+# Mount efivarfs on EFI systems
+if [ -d "/sys/firmware/efi" ]; then
+       mount -t efivarfs efivarfs /sys/firmware/efi/efivars
+fi
+
+# Enable Unicode
+echo -en '\033%G' && kbd_mode -u
+
+# Load default console font
+setfont latarcyrheb-sun16
+
 # Silence the kernel
 echo >/proc/sys/kernel/printk "1 4 1 7"
 echo -n -e "\033[9;0]"
@@ -16,14 +32,16 @@ echo "Loading Installer..."
 ret=$?
 
 case "${ret}" in
-       0)
-               # The installer has finished without a problem.
-               ;;
-       *)
+       139)
                echo "The installer has crashed. You will be dropped to a debugging shell"
                /bin/bash --login
                ;;
 esac
 
+# Poweroff after an unattended installation
+if [ "${unattended}" = "1" ]; then
+       /shutdown poweroff
+fi
+
 # Reboot the system
 /shutdown reboot