From 87dbdfabda6e7a9d0cfd35a38b08cf0ff1a1d712 Mon Sep 17 00:00:00 2001 From: Someone Date: Mon, 18 Aug 2025 22:13:25 +0200 Subject: [PATCH] roles/base/grub/templates --- roles/base/grub/templates/10_linux.j2 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/roles/base/grub/templates/10_linux.j2 b/roles/base/grub/templates/10_linux.j2 index 1d35a29..d88cfd5 100644 --- a/roles/base/grub/templates/10_linux.j2 +++ b/roles/base/grub/templates/10_linux.j2 @@ -1,10 +1,11 @@ -#! /bin/sh +#!/bin/sh ################################################ ### Managed by someone's ansible provisioner ### ################################################ # Part of: https://git.somenet.org/root/pub/somesible.git # 2017-2025 by someone # + set -e # grub-mkconfig helper script. @@ -59,7 +60,7 @@ if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then OS=GNU/Linux else case ${GRUB_DISTRIBUTOR} in - Ubuntu|Kubuntu) + Ubuntu|Kubuntu|*GNU/Linux) OS="${GRUB_DISTRIBUTOR}" ;; *) @@ -82,7 +83,11 @@ case ${GRUB_DEVICE} in ;; esac -: ${GRUB_CMDLINE_LINUX_RECOVERY:=single} +if [ -x /lib/recovery-mode/recovery-menu ]; then + : ${GRUB_CMDLINE_LINUX_RECOVERY:=recovery} +else + : ${GRUB_CMDLINE_LINUX_RECOVERY:=single} +fi # Default to disabling partition uuid support to maintian compatibility with # older kernels. @@ -120,11 +125,6 @@ esac title_correction_code= -if [ -x /lib/recovery-mode/recovery-menu ]; then - GRUB_CMDLINE_LINUX_RECOVERY="${GRUB_CMDLINE_LINUX_RECOVERY} recovery" -else - GRUB_CMDLINE_LINUX_RECOVERY="${GRUB_CMDLINE_LINUX_RECOVERY} single" -fi if [ "$ubuntu_recovery" = 1 ]; then GRUB_CMDLINE_LINUX_RECOVERY="$GRUB_CMDLINE_LINUX_RECOVERY nomodeset" fi -- 2.47.2