Skip EFI support check if --vm is given
authorChris Hofstaedtler <chris@hofstaedtler.name>
Sun, 12 Nov 2023 19:29:39 +0000 (20:29 +0100)
committerChris Hofstaedtler <chris@hofstaedtler.name>
Fri, 17 Nov 2023 15:27:36 +0000 (16:27 +0100)
Hosts EFI support is unlikely to be related to the VMs EFI support, so this
check often only adds noise.

grml-debootstrap

index 00ce363..5ee3e5a 100755 (executable)
@@ -1034,14 +1034,16 @@ efi_support() {
 checkconfiguration()
 {
 
-if efi_support ; then
-  if [ -z "$_opt_efi" ] ; then
-    ewarn "EFI support detected but no --efi option given, please consider enabling it."
-  fi
-else
-  if [ -n "$_opt_efi" ] ; then
-     eerror "EFI option used but no EFI support detected."
-     bailout 1
+if [ -z "$VIRTUAL" ] ; then
+  if efi_support ; then
+    if [ -z "$_opt_efi" ] ; then
+      ewarn "EFI support detected but no --efi option given, please consider enabling it."
+    fi
+  else
+    if [ -n "$_opt_efi" ] ; then
+      eerror "EFI option used but no EFI support detected."
+      bailout 1
+    fi
   fi
 fi