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

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