Blob Blame History Raw
From 6cd7001b35c66a12787bc0943b9a7e83a3d443c0 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 8 Jul 2014 11:50:04 +0200
Subject: [PATCH] dracut.sh: always copy prelink files in FIPS mode

regardless of the the prelink={yes|no} switch
---
 dracut.sh | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/dracut.sh b/dracut.sh
index c6da411..22273a5 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1400,20 +1400,18 @@ if [[ $kernel_only != yes ]]; then
     fi
 fi
 
-if [[ $do_prelink == yes ]]; then
-    PRELINK_BIN="$(command -v prelink)"
-    if [[ $UID = 0 ]] && [[ $PRELINK_BIN ]]; then
-        if [[ $DRACUT_FIPS_MODE ]]; then
-            dinfo "*** Installing prelink files ***"
-            inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf /etc/prelink.cache
-        else
-            dinfo "*** Pre-linking files ***"
-            inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf
-            chroot "$initdir" "$PRELINK_BIN" -a
-            rm -f -- "$initdir/$PRELINK_BIN"
-            rm -fr -- "$initdir"/etc/prelink.*
-            dinfo "*** Pre-linking files done ***"
-        fi
+PRELINK_BIN="$(command -v prelink)"
+if [[ $UID = 0 ]] && [[ $PRELINK_BIN ]]; then
+    if [[ $DRACUT_FIPS_MODE ]]; then
+        dinfo "*** Installing prelink files ***"
+        inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf /etc/prelink.cache
+    elif [[ $do_prelink == yes ]]; then
+        dinfo "*** Pre-linking files ***"
+        inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf
+        chroot "$initdir" "$PRELINK_BIN" -a
+        rm -f -- "$initdir/$PRELINK_BIN"
+        rm -fr -- "$initdir"/etc/prelink.*
+        dinfo "*** Pre-linking files done ***"
     fi
 fi