Blob Blame History Raw
From 583fb23199d4c1293d38c72e0c29e74079441e46 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 15 Sep 2015 16:08:25 +0200
Subject: [PATCH] dracut.sh: do not create microcode, if no firmware is
 available

(cherry picked from commit 13b5c1d09e0e242f1817057501292fe9d7e9ad92)
---
 dracut.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dracut.sh b/dracut.sh
index 9128cb0..fe735bd 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1617,6 +1617,10 @@ if [[ $early_microcode = yes ]]; then
                         break;
                     fi
                 fi
+                for i in $_fwdir/$_fw/$_src; do
+                    [ -e $i ] && break
+                    break 2
+                done
                 cat $_fwdir/$_fw/$_src > $_dest_dir/${ucode_dest[$idx]}
                 create_early_cpio="yes"
             fi