Accepting request 790062 from home:gary_lin:branches:devel:openSUSE:Factory
Use the full path of efibootmgr to avoid errors when invoking shim-install from packagekitd (bsc#1168104) OBS-URL: https://build.opensuse.org/request/show/790062 OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory/shim?expand=0&rev=157
This commit is contained in:
parent
d2c2a9d07b
commit
f673bb4d2e
13
shim-install
13
shim-install
@ -14,6 +14,7 @@ sysconfdir="/etc"
|
||||
libdir="/usr/lib64" # Beware, this is arch dependent!
|
||||
datadir="/usr/share"
|
||||
source_dir="${datadir}/efi/${arch}"
|
||||
efibootmgr="/usr/sbin/efibootmgr"
|
||||
grub_probe="/usr/sbin/grub2-probe"
|
||||
grub_mkrelpath="/usr/bin/grub2-mkrelpath"
|
||||
grub_install="/usr/sbin/grub2-install"
|
||||
@ -252,9 +253,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
|
||||
@ -335,9 +336,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")"
|
||||
@ -359,12 +360,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
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 31 08:38:56 UTC 2020 - Gary Ching-Pang Lin <glin@suse.com>
|
||||
|
||||
- Use the full path of efibootmgr to avoid errors when invoking
|
||||
shim-install from packagekitd (bsc#1168104)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 30 06:20:47 UTC 2020 - Gary Ching-Pang Lin <glin@suse.com>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user