From bb232c88fa47ac8970d50dc97affe7cc65bc1ce9 Mon Sep 17 00:00:00 2001 From: Harald Hoyer 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 (cherry picked from commit 6cd7001b35c66a12787bc0943b9a7e83a3d443c0) --- dracut.sh | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/dracut.sh b/dracut.sh index 705f090..7997428 100755 --- a/dracut.sh +++ b/dracut.sh @@ -1314,20 +1314,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