iankelling.org
/
git
/
automated-distro-installer
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update upstream to 9084a3cbc0a55422beea4a55b530c1f03a910617 feb 2024
[automated-distro-installer]
/
fai
/
config
/
scripts
/
GRUB_PC
/
10-setup
diff --git
a/fai/config/scripts/GRUB_PC/10-setup
b/fai/config/scripts/GRUB_PC/10-setup
index 270b356b3f372b3eb8c386c7c3c049b56a7d0fec..b23cf36cf243cc2a7ca8a82e75736eb6a50b15f2 100755
(executable)
--- 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
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
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'
# 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
# skip the rest, if not an initial installation
if [ $FAI_ACTION != "install" ]; then
$ROOTCMD update-grub