]> 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>
Thu, 17 Sep 2015 18:07:26 +0000 (20:07 +0200)
check, if get_ucode_file() returned an empty string.

dracut.sh

index 980c7ff914268f8b841db844bd9ee3f9736b4db0..4e4f222b0324082999f8d929685669206da36fce 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -1489,12 +1489,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]}