Blame SOURCES/0195-dracut.sh-always-copy-prelink-files-in-FIPS-mode.patch

a56a5e
From bb232c88fa47ac8970d50dc97affe7cc65bc1ce9 Mon Sep 17 00:00:00 2001
a56a5e
From: Harald Hoyer <harald@redhat.com>
a56a5e
Date: Tue, 8 Jul 2014 11:50:04 +0200
a56a5e
Subject: [PATCH] dracut.sh: always copy prelink files in FIPS mode
a56a5e
a56a5e
regardless of the the prelink={yes|no} switch
a56a5e
a56a5e
(cherry picked from commit 6cd7001b35c66a12787bc0943b9a7e83a3d443c0)
a56a5e
---
a56a5e
 dracut.sh | 26 ++++++++++++--------------
a56a5e
 1 file changed, 12 insertions(+), 14 deletions(-)
a56a5e
a56a5e
diff --git a/dracut.sh b/dracut.sh
a56a5e
index 705f090..7997428 100755
a56a5e
--- a/dracut.sh
a56a5e
+++ b/dracut.sh
a56a5e
@@ -1314,20 +1314,18 @@ if [[ $kernel_only != yes ]]; then
a56a5e
     fi
a56a5e
 fi
a56a5e
 
a56a5e
-if [[ $do_prelink == yes ]]; then
a56a5e
-    PRELINK_BIN="$(command -v prelink)"
a56a5e
-    if [[ $UID = 0 ]] && [[ $PRELINK_BIN ]]; then
a56a5e
-        if [[ $DRACUT_FIPS_MODE ]]; then
a56a5e
-            dinfo "*** Installing prelink files ***"
a56a5e
-            inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf /etc/prelink.cache
a56a5e
-        else
a56a5e
-            dinfo "*** Pre-linking files ***"
a56a5e
-            inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf
a56a5e
-            chroot "$initdir" "$PRELINK_BIN" -a
a56a5e
-            rm -f -- "$initdir/$PRELINK_BIN"
a56a5e
-            rm -fr -- "$initdir"/etc/prelink.*
a56a5e
-            dinfo "*** Pre-linking files done ***"
a56a5e
-        fi
a56a5e
+PRELINK_BIN="$(command -v prelink)"
a56a5e
+if [[ $UID = 0 ]] && [[ $PRELINK_BIN ]]; then
a56a5e
+    if [[ $DRACUT_FIPS_MODE ]]; then
a56a5e
+        dinfo "*** Installing prelink files ***"
a56a5e
+        inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf /etc/prelink.cache
a56a5e
+    elif [[ $do_prelink == yes ]]; then
a56a5e
+        dinfo "*** Pre-linking files ***"
a56a5e
+        inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf
a56a5e
+        chroot "$initdir" "$PRELINK_BIN" -a
a56a5e
+        rm -f -- "$initdir/$PRELINK_BIN"
a56a5e
+        rm -fr -- "$initdir"/etc/prelink.*
a56a5e
+        dinfo "*** Pre-linking files done ***"
a56a5e
     fi
a56a5e
 fi
a56a5e