From 33d53869195f3cabca4b80b768b7961f21ca50f6 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Thu, 12 Dec 2019 10:37:06 +0100 Subject: [PATCH] Don't modify the BLS snippets on s390x Currently the 92-tuned.install kernel-install plugin adds the tuned params to the BLS config files in s390x machines. But the zipl bootloader doesn't have support for variables, which leads to cmdlines like the following: root=/dev/mapper/rhel-root crashkernel=auto rd.dasd=0.0.541f rd.dasd=0.0.551f rd.dasd=0.0.561f rd.dasd=0.0.571f rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap cio_ignore=all,!condev rd.znet=qeth,0.0.0600,0.0.0601,0.0.0602,layer2=1,portno=0 $tuned_params BOOT_IMAGE=0 Don't modify the BLS snippet since the zipl bootloader doesn't support the variables and just make the script to exit if the architecture is s390x. Signed-off-by: Javier Martinez Canillas --- 92-tuned.install | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/92-tuned.install b/92-tuned.install index 00eefc7..053073e 100644 --- a/92-tuned.install +++ b/92-tuned.install @@ -19,20 +19,15 @@ LOADER_ENTRIES="$BOOT_ROOT/loader/entries" [ "$COMMAND" = "add" ] || exit 0 -# Workaround for rhbz#1657858 +# The zipl bootloader doesn't support variables ARCH=`uname -m` -[ "${ARCH:0:4}" = "s390" ] -HANDLE_INITRD="$?" +[ "${ARCH:0:4}" = "s390" ] && exit 0 pushd "$LOADER_ENTRIES" &> /dev/null for f in `basename "$MACHINE_ID"`-*.conf; do if [ -f "$f" -a "${f: -12}" != "-rescue.conf" ]; then grep -q '^\s*options\s\+.*\$tuned_params' "$f" || sed -i '/^\s*options\s\+/ s/\(.*\)/\1 \$tuned_params/' "$f" - if [ "$HANDLE_INITRD" = "1" ]; then - grep -q '^\s*initrd\s\+.*\$tuned_initrd' "$f" || sed -i '/^\s*initrd\s\+/ s/\(.*\)/\1 \$tuned_initrd/' "$f" - else - sed -i '/^\s*initrd\s\+.*\$tuned_initrd/ s/\s\+\$tuned_initrd\b//g' "$f" - fi + grep -q '^\s*initrd\s\+.*\$tuned_initrd' "$f" || sed -i '/^\s*initrd\s\+/ s/\(.*\)/\1 \$tuned_initrd/' "$f" fi done popd &> /dev/null