Blame 0003-dracut.sh-always-copy-prelink-files-in-FIPS-mode.patch

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