From: Ismael Luceno Date: Wed, 24 Aug 2022 13:36:07 +0000 (+0200) Subject: templates: Set defaults using var substitution X-Git-Tag: grub-2.12-rc1~210 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc8768bdc32bc1c4f94980fc5bb35874739887cb;p=thirdparty%2Fgrub.git templates: Set defaults using var substitution Signed-off-by: Ismael Luceno Reviewed-by: Daniel Kiper --- 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.