From 1f1d7e3235ebf13c0361690e627dce4876c0cdba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Tue, 6 Oct 2015 15:53:24 +0200 Subject: [PATCH] spec: correctly remove tuned footprint from /etc/default/grub MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bootloader plugin adds there GRUB_CMDLINE_LINUX_DEFAULT tuned setting which should be removed upon Tuned uninstallation. This commit fixes the regex used in %postun to correctly remove the Tuned footprint from there. Resolves: rhbz#1268845 Signed-off-by: Jaroslav Škarvada --- tuned.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuned.spec b/tuned.spec index 5e2c284..7d3e92e 100644 --- a/tuned.spec +++ b/tuned.spec @@ -166,7 +166,7 @@ if [ "$1" == 0 ]; then rm -f %{_sysconfdir}/grub.d/00_tuned || : # unpatch /etc/default/grub if [ -r "%{_sysconfdir}/default/grub" ]; then - sed -i '/GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT \\$tuned_params"/d' %{_sysconfdir}/default/grub + sed -i '/GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT:+$GRUB_CMDLINE_LINUX_DEFAULT }\\$tuned_params"/d' %{_sysconfdir}/default/grub fi fi