fix postun error in grub2-efi-x64

This commit is contained in:
Qiumiao Zhang 2021-03-22 10:01:57 +08:00
parent 1b7284a7cc
commit 1e0e02fbbf
2 changed files with 9 additions and 6 deletions

View File

@ -293,10 +293,10 @@ if [ "xvfat" != "x$res" -a "xfat" != "x$res" ]; then \
fi \ fi \
\ \
%postun %{1} \ %postun %{1} \
if [ "x0" == "x$1" ];then \ if [ "x0" == "x$1" ]; then \
res=$(grub2-probe /boot) \ res=$(grub2-probe /boot) \
if[ "xvfat" != "x$res" -a "xfat" != "x$res" ];then \ if [ "xvfat" != "x$res" -a "xfat" != "x$res" ]; then \
rm -f /boot/grub2/grubenv \ rm -f /boot/grub2/grubenv \
fi \ fi \
fi \ fi \
\ \
@ -387,8 +387,8 @@ done \
-p /EFI/%{efi_vendor} -d grub-core ${GRUB_MODULES} \ -p /EFI/%{efi_vendor} -d grub-core ${GRUB_MODULES} \
%{4}./grub-mkimage -O %{1} -o %{3}.orig \\\ %{4}./grub-mkimage -O %{1} -o %{3}.orig \\\
-p /EFI/BOOT -d grub-core ${GRUB_MODULES} \ -p /EFI/BOOT -d grub-core ${GRUB_MODULES} \
install -m 700 %{2}.orig %{2} \ install -m 700 %{2}.orig %{2} \
install -m 700 %{3}.orig %{3} \ install -m 700 %{3}.orig %{3} \
%{nil} %{nil}
%else %else
%define mkimage() \ %define mkimage() \

View File

@ -7,7 +7,7 @@
Name: grub2 Name: grub2
Epoch: 1 Epoch: 1
Version: 2.04 Version: 2.04
Release: 12 Release: 13
Summary: Bootloader with support for Linux, Multiboot and more Summary: Bootloader with support for Linux, Multiboot and more
License: GPLv3+ License: GPLv3+
URL: http://www.gnu.org/software/grub/ URL: http://www.gnu.org/software/grub/
@ -448,6 +448,9 @@ rm -r /boot/grub2.tmp/ || :
%{_datadir}/man/man* %{_datadir}/man/man*
%changelog %changelog
* Sun Mar 21 2021 orange-snn <songnannan2@huawei.com> - 2.04-13
- fix postun error in grub2-efi-x64
* Wed Mar 17 2021 zhangqiumiao <zhangqiumiao1@huawei.com> - 2.04-12 * Wed Mar 17 2021 zhangqiumiao <zhangqiumiao1@huawei.com> - 2.04-12
- Type:bugfix - Type:bugfix
- ID:NA - ID:NA