Update GRUB test for Secure Boot support
[grml-live.git] / templates / boot / grub / grmlenv.cfg
index fe779ee..ef37872 100644 (file)
@@ -1,11 +1,12 @@
 # this is a simple test to identify whether it looks like the Secure Boot enabled/signed
-# GRUB is running or if it's a full featured GRUB version, the former doesn't allow running cpuid
-if cpuid ; then
-  echo "It looks like Secure Boot is NOT enabled."
-  set grml_secureboot=false
-  export grml_secureboot
-else
+# GRUB is running or if it's a full featured GRUB version, the former doesn't
+# fail with invalid usage, while the later will fail with "error: device name required."
+if probe ; then
   echo "It looks like Secure Boot is enabled."
   set grml_secureboot=true
   export grml_secureboot
+else
+  echo "It looks like Secure Boot is NOT enabled."
+  set grml_secureboot=false
+  export grml_secureboot
 fi