]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
templates: Set defaults using var substitution
authorIsmael Luceno <iluceno@suse.de>
Wed, 24 Aug 2022 13:36:07 +0000 (15:36 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 7 Dec 2022 13:47:11 +0000 (14:47 +0100)
Signed-off-by: Ismael Luceno <iluceno@suse.de>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
util/grub.d/10_linux.in
util/grub.d/20_linux_xen.in

index 7263f298356adb2b4405ef4ea45e60146f64ea24..cc393be7eda9ab79cd0207434924c06fbd27bb6d 100644 (file)
@@ -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.
index 386bfb9bef69ab10cc774028f750b46ca323e70e..c1ebd09530d9a0ed3b3d8da57df1df412959483d 100644 (file)
@@ -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.