X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=blobdiff_plain;f=src%2Finstaller%2Fdracut-module%2Frun-installer.sh;h=33c8c4b10b7fe54a5e9d7cc5532ad662cf72dbe2;hp=1a7bd137214afdcf020b98510fc2e5ba9e303a46;hb=HEAD;hpb=1bbc591d4dcce94f85bc7f1de7d49f4a42d828b6 diff --git a/src/installer/dracut-module/run-installer.sh b/src/installer/dracut-module/run-installer.sh index 1a7bd13721..755de1d3a2 100644 --- a/src/installer/dracut-module/run-installer.sh +++ b/src/installer/dracut-module/run-installer.sh @@ -3,11 +3,21 @@ # 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-16 +setfont latarcyrheb-sun16 # Silence the kernel echo >/proc/sys/kernel/printk "1 4 1 7" @@ -22,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