]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut.sh: no microcode, if get_ucode_file returns empty file
authorHarald Hoyer <harald@redhat.com>
Thu, 17 Sep 2015 18:03:54 +0000 (20:03 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 11 Nov 2015 15:47:03 +0000 (16:47 +0100)
check, if get_ucode_file() returned an empty string.

(cherry picked from commit 327d765512135721a323822a8b10ac1539bd20c6)

dracut.sh

index fe735bdb17f3c13ee951e08ebcc85c365ce45c91..b84013a902e2986ded95bb32847ade8f3049b4b4 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -1613,12 +1613,12 @@ if [[ $early_microcode = yes ]]; then
                 dinfo "*** Constructing ${ucode_dest[$idx]} ****"
                 if [[ $hostonly ]]; then
                     _src=$(get_ucode_file)
-                    if ! [[ -r $_fwdir/$_fw/$_src ]];then
-                        break;
-                    fi
+                    [[ $src ]] || break
+                    [[ -r $_fwdir/$_fw/$_src ]] || break
                 fi
+
                 for i in $_fwdir/$_fw/$_src; do
-                    [ -e $i ] && break
+                    [ -e "$i" ] && break
                     break 2
                 done
                 cat $_fwdir/$_fw/$_src > $_dest_dir/${ucode_dest[$idx]}