install-kernel: handle custom EFI directory

Fixes QubesOS/qubes-issues#1676
pull/12/head
Marek Marczykowski-Górecki 8 years ago
parent 769e70e76a
commit 37f92396c4
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

@ -6,7 +6,23 @@ COMMAND="$1"
KVER="$2"
ESP_MOUNTPOINT=/boot/efi
EFI_DIR="$ESP_MOUNTPOINT/EFI/qubes"
EFI_DIR=$(efibootmgr -v 2>/dev/null | awk '
/^BootCurrent:/ { current=$2; }
/^Boot....\* / {
if ("Boot" current "*" == $1) {
sub(".*File\\(", "");
sub("\\\\xen.efi\\)", "");
gsub("\\\\", "/");
print;
}
}')
if [ -z "$EFI_DIR" ]; then
EFI_DIR="$ESP_MOUNTPOINT/EFI/qubes"
else
EFI_DIR="$ESP_MOUNTPOINT$EFI_DIR"
fi
if [ ! -d "$EFI_DIR" ]; then
# non-EFI system

Loading…
Cancel
Save