]> code.delx.au - refind/blobdiff - refind.spec
install.sh & related: Improved Secure Boot detection & removed error
[refind] / refind.spec
index 35017322c80f2400f54fedf7cbed5572f4b5b977..76d95333bb3094bcf344348f1bf95d32315a9c74 100644 (file)
@@ -1,7 +1,7 @@
 Summary: EFI boot manager software
 Name: refind
-Version: 0.8.2
-Release: 2%{?dist}
+Version: 0.8.6.1
+Release: 1%{?dist}
 Summary: EFI boot manager software
 License: GPLv3
 URL: http://www.rodsbooks.com/refind/
@@ -125,7 +125,11 @@ fi
 
 cd /usr/share/refind-%{version}
 
-declare VarFile=`ls -d /sys/firmware/efi/vars/SecureBoot* 2> /dev/null`
+if [[ -f /sys/firmware/efi/vars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c/data ]] ; then
+   IsSecureBoot=`od -An -t u1 /sys/firmware/efi/vars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c/data | tr -d '[[:space:]]'`
+else
+   IsSecureBoot="0"
+fi
 # Note: Two find operations for ShimFile favors shim over PreLoader -- if both are
 # present, the script uses shim rather than PreLoader.
 declare ShimFile=`find /boot -name shim\.efi -o -name shimx64\.efi -o -name PreLoader\.efi 2> /dev/null | head -n 1`
@@ -144,7 +148,7 @@ declare OpenSSL=`which openssl 2> /dev/null`
 # enroll an extra MOK. I'm including it here because I'm NOT a
 # distribution maintainer, and I want to encourage users to use
 # their own local keys.
-if [[ -n $VarFile && -n $ShimFile ]] ; then
+if [[ $IsSecureBoot == "1" && -n $ShimFile ]] ; then
    if [[ -n $SBSign && -n $OpenSSL ]] ; then
       ./install.sh --shim $ShimFile --localkeys --yes
    else
@@ -159,6 +163,14 @@ fi
 # wiping out the just-updated files.
 
 %changelog
+* Sun Feb 8 2015 R Smith <rodsmith@rodsbooks.com> - 0.8.6
+- Updated spec file for 0.8.6
+* Sun Feb 2 2015 R Smith <rodsmith@rodsbooks.com> - 0.8.5
+- Updated spec file for 0.8.5
+* Mon Dec 8 2014 R Smith <rodsmith@rodsbooks.com> - 0.8.4
+- Updated spec file for 0.8.4
+* Sun Jul 6 2014 R Smith <rodsmith@rodsbooks.com> - 0.8.3
+- Updated spec file for 0.8.3
 * Sun Jun 8 2014 R Smith <rodsmith@rodsbooks.com> - 0.8.2
 - Updated spec file for 0.8.2
 * Thu May 15 2014 R Smith <rodsmith@rodsbooks.com> - 0.8.1