Fix a bug in EFI detection because of redirecting result output

This commit is contained in:
Hedayat Vatankhah 2013-06-19 01:44:55 +04:30
parent ba908ba391
commit f5f9525db2
2 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,15 @@
diff -up os-prober-1.58/os-probes/mounted/x86/05efi.factor-out-logger-efi-fix os-prober-1.58/os-probes/mounted/x86/05efi
--- os-prober-1.58/os-probes/mounted/x86/05efi.factor-out-logger-efi-fix 2013-04-25 04:23:06.000000000 +0430
+++ os-prober-1.58/os-probes/mounted/x86/05efi 2013-06-19 01:42:05.428750558 +0430
@@ -58,7 +58,11 @@ ret=1
for test in /usr/lib/os-probes/mounted/efi/*; do
debug "running subtest $test"
if [ -f "$test" ] && [ -x "$test" ]; then
+ # we need results of subtest in stdout
+ orig_fd_res=$fd_result
+ export fd_result=1
entry=$("$test" "$mpoint/$efi")
+ export fd_result=$orig_fd_res
if [ -n "$entry" ]; then
debug "bootloader $entry found by subtest $test"
ret=0

View File

@ -1,6 +1,6 @@
Name: os-prober
Version: 1.58
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Probes disks on the system for installed operating systems
Group: System Environment/Base
@ -22,6 +22,8 @@ Patch7: os-prober-btrfsfix.patch
Patch8: os-prober-bootpart-name-fix.patch
Patch9: os-prober-mounted-partitions-fix.patch
Patch10: os-prober-factor-out-logger.patch
# To be sent upstream
Patch11: os-prober-factored-logger-efi-fix.patch
Requires: udev coreutils util-linux
Requires: grep /bin/sed /sbin/modprobe
@ -44,6 +46,7 @@ distributions can be added easily.
%patch8 -p1 -b .bootpart-name-fix
%patch9 -p1 -b .mounted-partitions-fix
%patch10 -p1 -b .factor-out-logger
%patch11 -p1 -b .factor-out-logger-efi-fix
find -type f -exec sed -i -e 's|usr/lib|usr/libexec|g' {} \;
sed -i -e 's|grub-probe|grub2-probe|g' os-probes/common/50mounted-tests \
@ -94,6 +97,9 @@ fi
%{_var}/lib/%{name}
%changelog
* Tue Jun 18 2013 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.58-2
- Fix a bug in EFI detection because of redirecting result output
* Sun May 05 2013 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.58-1
- Update to upstream version 1.58, with UEFI support