Blame SOURCES/0368-dracut.sh-for-microcode-generation-skip-gpg-files.patch

712866
From 3a39dd027f1574bdddb664d14dd592d23ce7eef1 Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Wed, 18 Nov 2015 10:58:54 +0100
712866
Subject: [PATCH] dracut.sh: for microcode generation, skip gpg files
712866
712866
skip all ".asc" files for the AMD microcode generation
712866
712866
(cherry picked from commit c44d2252bb4b9e72f2b058f8c185698e88dc8374)
712866
---
712866
 dracut.sh | 7 ++++++-
712866
 1 file changed, 6 insertions(+), 1 deletion(-)
712866
712866
diff --git a/dracut.sh b/dracut.sh
712866
index 5b72221..6bbde70 100755
712866
--- a/dracut.sh
712866
+++ b/dracut.sh
712866
@@ -1497,7 +1497,12 @@ if [[ $early_microcode = yes ]]; then
712866
                     [ -e "$i" ] && break
712866
                     break 2
712866
                 done
712866
-                cat $_fwdir/$_fw/$_src > $_dest_dir/${ucode_dest[$idx]}
712866
+                for i in $_fwdir/$_fw/$_src; do
712866
+                    [[ -e "$i" ]] || continue
712866
+                    # skip gpg files
712866
+                    str_ends "$i" ".asc" && continue
712866
+                    cat "$i" >> $_dest_dir/${ucode_dest[$idx]}
712866
+                done
712866
                 create_early_cpio="yes"
712866
             fi
712866
         done