From fc8768bdc32bc1c4f94980fc5bb35874739887cb Mon Sep 17 00:00:00 2001 From: Ismael Luceno Date: Wed, 24 Aug 2022 15:36:07 +0200 Subject: [PATCH] templates: Set defaults using var substitution Signed-off-by: Ismael Luceno Reviewed-by: Daniel Kiper --- util/grub.d/10_linux.in | 6 ++---- util/grub.d/20_linux_xen.in | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in index 7263f2983..cc393be7e 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -43,13 +43,11 @@ case ${GRUB_DEVICE} in ;; esac -if [ "x${GRUB_CMDLINE_LINUX_RECOVERY}" = "x" ] ; then - GRUB_CMDLINE_LINUX_RECOVERY=single -fi +: ${GRUB_CMDLINE_LINUX_RECOVERY:=single} # Default to disabling partition uuid support to maintian compatibility with # older kernels. -GRUB_DISABLE_LINUX_PARTUUID=${GRUB_DISABLE_LINUX_PARTUUID-true} +: ${GRUB_DISABLE_LINUX_PARTUUID=true} # btrfs may reside on multiple devices. We cannot pass them as value of root= parameter # and mounting btrfs requires user space scanning, so force UUID in this case. diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in index 386bfb9be..c1ebd0953 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in @@ -43,13 +43,11 @@ case ${GRUB_DEVICE} in ;; esac -if [ "x${GRUB_CMDLINE_LINUX_RECOVERY}" = "x" ] ; then - GRUB_CMDLINE_LINUX_RECOVERY=single -fi +: ${GRUB_CMDLINE_LINUX_RECOVERY:=single} # Default to disabling partition uuid support to maintian compatibility with # older kernels. -GRUB_DISABLE_LINUX_PARTUUID=${GRUB_DISABLE_LINUX_PARTUUID-true} +: ${GRUB_DISABLE_LINUX_PARTUUID=true} # btrfs may reside on multiple devices. We cannot pass them as value of root= parameter # and mounting btrfs requires user space scanning, so force UUID in this case. -- 2.47.2