Blame SOURCES/0348-dracut.sh-no-microcode-if-get_ucode_file-returns-emp.patch

712866
From 327d765512135721a323822a8b10ac1539bd20c6 Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Thu, 17 Sep 2015 20:03:54 +0200
712866
Subject: [PATCH] dracut.sh: no microcode, if get_ucode_file returns empty file
712866
712866
check, if get_ucode_file() returned an empty string.
712866
---
712866
 dracut.sh | 8 ++++----
712866
 1 file changed, 4 insertions(+), 4 deletions(-)
712866
712866
diff --git a/dracut.sh b/dracut.sh
712866
index 980c7ff..4e4f222 100755
712866
--- a/dracut.sh
712866
+++ b/dracut.sh
712866
@@ -1489,12 +1489,12 @@ if [[ $early_microcode = yes ]]; then
712866
                 dinfo "*** Constructing ${ucode_dest[$idx]} ****"
712866
                 if [[ $hostonly ]]; then
712866
                     _src=$(get_ucode_file)
712866
-                    if ! [[ -r $_fwdir/$_fw/$_src ]];then
712866
-                        break;
712866
-                    fi
712866
+                    [[ $src ]] || break
712866
+                    [[ -r $_fwdir/$_fw/$_src ]] || break
712866
                 fi
712866
+
712866
                 for i in $_fwdir/$_fw/$_src; do
712866
-                    [ -e $i ] && break
712866
+                    [ -e "$i" ] && break
712866
                     break 2
712866
                 done
712866
                 cat $_fwdir/$_fw/$_src > $_dest_dir/${ucode_dest[$idx]}