From 298aa12e25508b741dd1c7f117a24e7292db4ca3 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Mon, 20 May 2019 18:34:12 +0200 Subject: [PATCH] Only execute grub2-switch-to-blscfg if GRUB_ENABLE_BLSCFG isn't set There's no point on executing the script if GRUB_ENABLE_BLSCFG has already been set. Currently was checking if an user explicitly set it to false to avoid enabling the BLS configuration, but it should also be avoided if was already set to true by a previous package update or during installation. Signed-off-by: Javier Martinez Canillas --- grub2.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub2.spec b/grub2.spec index 31e1a5c..4371efa 100644 --- a/grub2.spec +++ b/grub2.spec @@ -310,7 +310,7 @@ fi %posttrans tools if [ -f /etc/default/grub ]; then - ! grep -q '^GRUB_ENABLE_BLSCFG=false' /etc/default/grub && \ + ! grep -q '^GRUB_ENABLE_BLSCFG=.*' /etc/default/grub && \ /sbin/grub2-switch-to-blscfg --backup-suffix=.rpmsave &>/dev/null || : fi