Skip to contentSkip to conversation

templates: Set defaults using var substitution

PATCH RESEND In review Ismael Luceno 2 participants 2 messages Aug 24, 2022 – Nov 24, 2022

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 templates: Set defaults using var substitution

---
 util/grub.d/10_linux.in     | 6 ++----
 util/grub.d/20_linux_xen.in | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)
util/grub.d/10_linux.in +2 -4
index c6a1ec935bfc..321e590da192 100644
@@ -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.
util/grub.d/20_linux_xen.in +2 -4
index 626aed40cbfd..554db9083936 100644
@@ -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.
Signature · 1 line
2.37.1