Fix non-functioning secure boot install script

This commit is contained in:
Manuel Thalmann 2024-06-19 13:39:14 +02:00
parent dd03c14bbb
commit a20e7059c5

View file

@ -1,10 +1,14 @@
#!/bin/bash
EFI_BOOT_DIR="${EFI_BOOT_DIR:-"/boot"}";
BOOTLOADER_ID=${BOOTLOADER_ID:-"Arch"};
bootNum="$(efibootmgr | sed "/$BOOTLOADER_ID/{ s/^.*Boot\([[:digit:]]\+\)\*.*$/\1/; p; }; d")";
bootNums="$(efibootmgr | sed "/$BOOTLOADER_ID/{ s/^.*Boot\([[:digit:]]\+\)\*.*$/\1/; p; }; d")";
yay --noconfirm -Syu secureboot-grub;
sudo efibootmgr --delete-bootnum --bootnum "$bootNum";
for bootNum in $bootNums;
do
sudo efibootmgr --delete-bootnum --bootnum "$bootNum"
done;
sudo sed -i \
-e "/esp=/{" \