]> git.proxmox.com Git - grub2.git/commitdiff
Add GRUB_RECOVERY_TITLE option
authorColin Watson <cjwatson@ubuntu.com>
Mon, 13 Jan 2014 12:13:33 +0000 (12:13 +0000)
committerColin Watson <cjwatson@debian.org>
Thu, 14 May 2015 15:15:19 +0000 (16:15 +0100)
This allows the controversial "recovery mode" text to be customised.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1240360
Forwarded: no
Last-Update: 2013-12-25

Patch-Name: mkconfig_recovery_title.patch

docs/grub.texi
util/grub-mkconfig.in
util/grub.d/10_hurd.in
util/grub.d/10_kfreebsd.in
util/grub.d/10_linux.in
util/grub.d/10_netbsd.in
util/grub.d/20_linux_xen.in

index a79256bf3f6ed282859eb3c143d9882bbccda404..49b17ec5ad54bbebd1792aa320685980a1993f54 100644 (file)
@@ -1504,6 +1504,11 @@ a console is restricted or limited.
 This option is only effective when GRUB was configured with the
 @option{--enable-quick-boot} option.
 
+@item GRUB_RECOVERY_TITLE
+This option sets the English text of the string that will be displayed in
+parentheses to indicate that a boot option is provided to help users recover
+a broken system.  The default is "recovery mode".
+
 @end table
 
 The following options are still accepted for compatibility with existing
index 17350d47c0d77f981132f7f403886b0b85fc174c..ccce9e5a91acf4d1196d04c5288c527fd85b71b5 100644 (file)
@@ -186,6 +186,10 @@ GRUB_ACTUAL_DEFAULT="$GRUB_DEFAULT"
 
 if [ "x${GRUB_ACTUAL_DEFAULT}" = "xsaved" ] ; then GRUB_ACTUAL_DEFAULT="`"${grub_editenv}" - list | sed -n '/^saved_entry=/ s,^saved_entry=,,p'`" ; fi
 
+if [ "x${GRUB_RECOVERY_TITLE}" = "x" ]; then
+  GRUB_RECOVERY_TITLE="recovery mode"
+fi
+
 
 # These are defined in this script, export them here so that user can
 # override them.
@@ -237,7 +241,8 @@ export GRUB_DEFAULT \
   GRUB_BADRAM \
   GRUB_OS_PROBER_SKIP_LIST \
   GRUB_DISABLE_SUBMENU \
-  GRUB_RECORDFAIL_TIMEOUT
+  GRUB_RECORDFAIL_TIMEOUT \
+  GRUB_RECOVERY_TITLE
 
 if test "x${grub_cfg}" != "x"; then
   rm -f "${grub_cfg}.new"
index 82dfe193f36ecf66d9f9defc78b75897e15e0a50..6fafe1a7c09b529e9fbab84b51b1a9d30fd2efeb 100644 (file)
@@ -88,8 +88,8 @@ hurd_entry () {
 
   if [ x$type != xsimple ] ; then
       if [ x$type = xrecovery ] ; then
-         title="$(gettext_printf "%s, with Hurd %s (recovery mode)" "${OS}" "${kernel_base}")"
-         oldtitle="$OS using $kernel_base (recovery mode)"
+         title="$(gettext_printf "%s, with Hurd %s (%s)" "${OS}" "${kernel_base}" "$(gettext "${GRUB_RECOVERY_TITLE}")")"
+         oldtitle="$OS using $kernel_base ($GRUB_RECOVERY_TITLE)"
       else
          title="$(gettext_printf "%s, with Hurd %s" "${OS}" "${kernel_base}")"
          oldtitle="$OS using $kernel_base"
index a524762fcdbe31c4ed99ad83aae5f144a5c7b5b3..7b04a87c81a4e8fc04c64969d0f3f3d196be3c04 100644 (file)
@@ -76,7 +76,7 @@ kfreebsd_entry ()
   fi
   if [ x$type != xsimple ] ; then
       if [ x$type = xrecovery ] ; then
-         title="$(gettext_printf "%s, with kFreeBSD %s (recovery mode)" "${os}" "${version}")"
+         title="$(gettext_printf "%s, with kFreeBSD %s (%s)" "${os}" "${version}" "$(gettext "${GRUB_RECOVERY_TITLE}")")"
       else
          title="$(gettext_printf "%s, with kFreeBSD %s" "${os}" "${version}")"
       fi
index 8d9588767bab9068b80fab91dc9632ca9a34c6db..024a89e3defc4e07001d88a4fb5f613aa9ce3876 100644 (file)
@@ -114,7 +114,7 @@ linux_entry ()
   if [ x$type != xsimple ] ; then
       case $type in
          recovery)
-             title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;;
+             title="$(gettext_printf "%s, with Linux %s (%s)" "${os}" "${version}" "$(gettext "${GRUB_RECOVERY_TITLE}")")" ;;
          *)
              title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
       esac
index 29a0e41a9a51dd2af911113909da21cb287b6796..21c7e7d7784d3255c51d56bf4459a8bade7526c1 100644 (file)
@@ -102,7 +102,7 @@ netbsd_entry ()
 
   if [ x$type != xsimple ] ; then
       if [ x$type = xrecovery ] ; then
-         title="$(gettext_printf "%s, with kernel %s (via %s, recovery mode)" "${OS}" "$(echo ${kernel} | sed -e 's,^.*/,,')" "${loader}")"
+         title="$(gettext_printf "%s, with kernel %s (via %s, %s)" "${OS}" "$(echo ${kernel} | sed -e 's,^.*/,,')" "${loader}" "$(gettext "${GRUB_RECOVERY_TITLE}")")"
       else
          title="$(gettext_printf "%s, with kernel %s (via %s)" "${OS}" "$(echo ${kernel} | sed -e 's,^.*/,,')" "${loader}")"
       fi
index fb4f615d692356e2cf0b94e929471aa79b9765de..10a3db5d375bf0e3481811a97d3894e5acf743fc 100644 (file)
@@ -93,7 +93,7 @@ linux_entry ()
   fi
   if [ x$type != xsimple ] ; then
       if [ x$type = xrecovery ] ; then
-         title="$(gettext_printf "%s, with Xen %s and Linux %s (recovery mode)" "${os}" "${xen_version}" "${version}")"
+         title="$(gettext_printf "%s, with Xen %s and Linux %s (%s)" "${os}" "${xen_version}" "${version}" "$(gettext "${GRUB_RECOVERY_TITLE}")")"
       else
          title="$(gettext_printf "%s, with Xen %s and Linux %s" "${os}" "${xen_version}" "${version}")"
       fi