X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=fai%2Fconfig%2Fscripts%2FGRUB_PC%2F10-setup;fp=fai%2Fconfig%2Fscripts%2FGRUB_PC%2F10-setup;h=b23cf36cf243cc2a7ca8a82e75736eb6a50b15f2;hp=270b356b3f372b3eb8c386c7c3c049b56a7d0fec;hb=723056c40d38694c14d9bcb6b4a3108f7054a2a1;hpb=94a151efd665eb0214c2c85604b81377fb346de8 diff --git a/fai/config/scripts/GRUB_PC/10-setup b/fai/config/scripts/GRUB_PC/10-setup index 270b356..b23cf36 100755 --- a/fai/config/scripts/GRUB_PC/10-setup +++ b/fai/config/scripts/GRUB_PC/10-setup @@ -3,6 +3,11 @@ error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code +# do only execute for Debian and similar distros +if ! ifclass DEBIAN ; then + exit 0 +fi + set -a # do not set up grub during dirinstall @@ -19,6 +24,11 @@ fi # disable os-prober because of #802717 ainsl /etc/default/grub 'GRUB_DISABLE_OS_PROBER=true' +# efivars may still be mounted from the host system during fai-diskimage +if [ -d $target/sys/firmware/efi/efivars ]; then + umount $target/sys/firmware/efi/efivars +fi + # skip the rest, if not an initial installation if [ $FAI_ACTION != "install" ]; then $ROOTCMD update-grub