Merge branch 'upstream'
[automated-distro-installer] / fai / config / class / 85-efi-classes
index ee2f04b97187789f1b6dc1006f4ef22ac5d80234..711b53479e623da3355248ee4580a898a569be6c 100755 (executable)
@@ -2,16 +2,13 @@
 
 # define classes for disk_config in an EFI enironment
 
-if [ ! -d /sys/firmware/efi ]; then
+if [ ! -d /sys/firmware/efi ] || ifclass GRUB_PC; then
     exit 0
 fi
 
-if ifclass FAIBASE; then
-    echo FAIBASE_EFI
-elif ifclass FAISERVER; then
-    echo FAISERVER_EFI
-elif ifclass LVM; then
-    echo LVM_EFI
-elif ifclass XENIAL; then
-    echo XENIAL_EFI
-fi
+for c in LVM FAISERVER FAIBASE; do
+    if ifclass $c; then
+       echo ${c}_EFI
+       break
+    fi
+done