64b87c
From 13b5c1d09e0e242f1817057501292fe9d7e9ad92 Mon Sep 17 00:00:00 2001
64b87c
From: Harald Hoyer <harald@redhat.com>
64b87c
Date: Tue, 15 Sep 2015 16:08:25 +0200
64b87c
Subject: [PATCH] dracut.sh: do not create microcode, if no firmware is
64b87c
 available
64b87c
64b87c
---
64b87c
 dracut.sh | 4 ++++
64b87c
 1 file changed, 4 insertions(+)
64b87c
64b87c
diff --git a/dracut.sh b/dracut.sh
1755ca
index d5f864f9..980c7ff9 100755
64b87c
--- a/dracut.sh
64b87c
+++ b/dracut.sh
64b87c
@@ -1493,6 +1493,10 @@ if [[ $early_microcode = yes ]]; then
64b87c
                         break;
64b87c
                     fi
64b87c
                 fi
64b87c
+                for i in $_fwdir/$_fw/$_src; do
64b87c
+                    [ -e $i ] && break
64b87c
+                    break 2
64b87c
+                done
64b87c
                 cat $_fwdir/$_fw/$_src > $_dest_dir/${ucode_dest[$idx]}
64b87c
                 create_early_cpio="yes"
64b87c
             fi