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=ed8d878ae0395bee09028706c56e9a922fd26510;hp=11535f11f5b2b4df0f6943a552c020523989842d;hb=HEAD;hpb=936324619541130f4ab07bd4633f48eb81812613 diff --git a/fai/config/scripts/GRUB_PC/10-setup b/fai/config/scripts/GRUB_PC/10-setup index 11535f1..ed8d878 100755 --- a/fai/config/scripts/GRUB_PC/10-setup +++ b/fai/config/scripts/GRUB_PC/10-setup @@ -4,6 +4,11 @@ error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code set -x +# do only execute for Debian and similar distros +if ! ifclass DEBIAN ; then + exit 0 +fi + set -a # do not set up grub during dirinstall @@ -20,6 +25,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