diff --git a/shim-install b/shim-install index cb7fa90..524c292 100644 --- a/shim-install +++ b/shim-install @@ -12,6 +12,7 @@ clean=no sysconfdir="/etc" libdir="/usr/lib64" source_dir="$libdir/efi" +efibootmgr="/usr/sbin/efibootmgr" grub_probe="/usr/sbin/grub2-probe" grub_mkrelpath="/usr/bin/grub2-mkrelpath" grub_install="/usr/sbin/grub2-install" @@ -245,9 +246,9 @@ if test "$clean" = "yes"; then fi if test "$no_nvram" = no && test -n "$bootloader_id"; then # Delete old entries from the same distributor. - for bootnum in `efibootmgr | grep '^Boot[0-9]' | \ + for bootnum in `$efibootmgr | grep '^Boot[0-9]' | \ fgrep -i " $bootloader_id" | cut -b5-8`; do - efibootmgr -b "$bootnum" -B + $efibootmgr -b "$bootnum" -B done fi exit 0 @@ -323,9 +324,9 @@ if test "$no_nvram" = no && test -n "$bootloader_id"; then modprobe -q efivars 2>/dev/null || true # Delete old entries from the same distributor. - for bootnum in `efibootmgr | grep '^Boot[0-9]' | \ + for bootnum in `$efibootmgr | grep '^Boot[0-9]' | \ fgrep -i " $bootloader_id" | cut -b5-8`; do - efibootmgr -b "$bootnum" -B + $efibootmgr -b "$bootnum" -B done efidir_drive="$("$grub_probe" --target=drive --device-map= "$efidir")" @@ -344,12 +345,12 @@ if test "$no_nvram" = no && test -n "$bootloader_id"; then efidir_disk="$("$grub_probe" --target=disk --device-map= -d "$mddev")" efidir_part="$(echo "$efidir_drive" | sed 's/^([^,]*,[^0-9]*//; s/[^0-9].*//')" efidir_d=${mddev#/dev/} - efibootmgr -c -d "$efidir_disk" -p "$efidir_part" -w \ + $efibootmgr -c -d "$efidir_disk" -p "$efidir_part" -w \ -L "$bootloader_id ($efidir_d)" -l "\\EFI\\$efi_distributor\\$efi_file" done else efidir_part="$(echo "$efidir_drive" | sed 's/^([^,]*,[^0-9]*//; s/[^0-9].*//')" - efibootmgr -c -d "$efidir_disk" -p "$efidir_part" -w \ + $efibootmgr -c -d "$efidir_disk" -p "$efidir_part" -w \ -L "$bootloader_id" -l "\\EFI\\$efi_distributor\\$efi_file" fi fi diff --git a/shim-leap.changes b/shim-leap.changes index 4648c4b..1133e43 100644 --- a/shim-leap.changes +++ b/shim-leap.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 31 08:38:56 UTC 2020 - Gary Ching-Pang Lin + +- Use the full path of efibootmgr to avoid errors when invoking + shim-install from packagekitd (bsc#1168104) + ------------------------------------------------------------------- Mon Mar 30 06:05:58 UTC 2020 - Gary Ching-Pang Lin