Merge branch 'bug1676'

* bug1676:
  install-kernel: handle custom EFI directory
This commit is contained in:
Marek Marczykowski-Górecki 2016-10-03 11:48:19 +02:00
commit 34ed18527b
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -6,7 +6,23 @@ COMMAND="$1"
KVER="$2" KVER="$2"
ESP_MOUNTPOINT=/boot/efi 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 if [ ! -d "$EFI_DIR" ]; then
# non-EFI system # non-EFI system