Accepting request 790405 from 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/790405 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/shim-leap?expand=0&rev=11
This commit is contained in:
commit
0a96ce996e
13
shim-install
13
shim-install
@ -12,6 +12,7 @@ clean=no
|
|||||||
sysconfdir="/etc"
|
sysconfdir="/etc"
|
||||||
libdir="/usr/lib64"
|
libdir="/usr/lib64"
|
||||||
source_dir="$libdir/efi"
|
source_dir="$libdir/efi"
|
||||||
|
efibootmgr="/usr/sbin/efibootmgr"
|
||||||
grub_probe="/usr/sbin/grub2-probe"
|
grub_probe="/usr/sbin/grub2-probe"
|
||||||
grub_mkrelpath="/usr/bin/grub2-mkrelpath"
|
grub_mkrelpath="/usr/bin/grub2-mkrelpath"
|
||||||
grub_install="/usr/sbin/grub2-install"
|
grub_install="/usr/sbin/grub2-install"
|
||||||
@ -245,9 +246,9 @@ if test "$clean" = "yes"; then
|
|||||||
fi
|
fi
|
||||||
if test "$no_nvram" = no && test -n "$bootloader_id"; then
|
if test "$no_nvram" = no && test -n "$bootloader_id"; then
|
||||||
# Delete old entries from the same distributor.
|
# 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
|
fgrep -i " $bootloader_id" | cut -b5-8`; do
|
||||||
efibootmgr -b "$bootnum" -B
|
$efibootmgr -b "$bootnum" -B
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
@ -323,9 +324,9 @@ if test "$no_nvram" = no && test -n "$bootloader_id"; then
|
|||||||
modprobe -q efivars 2>/dev/null || true
|
modprobe -q efivars 2>/dev/null || true
|
||||||
|
|
||||||
# Delete old entries from the same distributor.
|
# 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
|
fgrep -i " $bootloader_id" | cut -b5-8`; do
|
||||||
efibootmgr -b "$bootnum" -B
|
$efibootmgr -b "$bootnum" -B
|
||||||
done
|
done
|
||||||
|
|
||||||
efidir_drive="$("$grub_probe" --target=drive --device-map= "$efidir")"
|
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_disk="$("$grub_probe" --target=disk --device-map= -d "$mddev")"
|
||||||
efidir_part="$(echo "$efidir_drive" | sed 's/^([^,]*,[^0-9]*//; s/[^0-9].*//')"
|
efidir_part="$(echo "$efidir_drive" | sed 's/^([^,]*,[^0-9]*//; s/[^0-9].*//')"
|
||||||
efidir_d=${mddev#/dev/}
|
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"
|
-L "$bootloader_id ($efidir_d)" -l "\\EFI\\$efi_distributor\\$efi_file"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
efidir_part="$(echo "$efidir_drive" | sed 's/^([^,]*,[^0-9]*//; s/[^0-9].*//')"
|
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"
|
-L "$bootloader_id" -l "\\EFI\\$efi_distributor\\$efi_file"
|
||||||
fi
|
fi
|
||||||
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:05:58 UTC 2020 - Gary Ching-Pang Lin <glin@suse.com>
|
Mon Mar 30 06:05:58 UTC 2020 - Gary Ching-Pang Lin <glin@suse.com>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user