Replace "single" with "recovery" when friendly-recovery is installed

(LP: #575469).
This commit is contained in:
Colin Watson 2013-01-21 10:39:27 +00:00
parent 3c93beb2a7
commit 3280ff94de
4 changed files with 33 additions and 5 deletions

2
debian/changelog vendored
View File

@ -14,6 +14,8 @@ grub2 (2.00-11) UNRELEASED; urgency=low
that this differs slightly from the fix in Ubuntu, which corrected that this differs slightly from the fix in Ubuntu, which corrected
behaviour when amending an existing configuration item but behaviour when amending an existing configuration item but
accidentally over-escaped when adding a new one. accidentally over-escaped when adding a new one.
- Replace "single" with "recovery" when friendly-recovery is installed
(LP: #575469).
-- Adam Conrad <adconrad@debian.org> Fri, 04 Jan 2013 13:11:42 -0700 -- Adam Conrad <adconrad@debian.org> Fri, 04 Jan 2013 13:11:42 -0700

2
debian/control vendored
View File

@ -75,7 +75,7 @@ Recommends: os-prober (>= 1.33)
Suggests: multiboot-doc, grub-emu, xorriso (>= 0.5.6.pl00), desktop-base (>= 4.0.6), console-setup Suggests: multiboot-doc, grub-emu, xorriso (>= 0.5.6.pl00), desktop-base (>= 4.0.6), console-setup
# See bugs #435983 and #455746 # See bugs #435983 and #455746
Conflicts: mdadm (<< 2.6.7-2) Conflicts: mdadm (<< 2.6.7-2)
Breaks: lupin-support (<< 0.30) Breaks: lupin-support (<< 0.30), friendly-recovery (<< 0.2.13)
Multi-Arch: foreign Multi-Arch: foreign
Description: GRand Unified Bootloader (common files) Description: GRand Unified Bootloader (common files)
This package contains common files shared by the distinct flavours of GRUB. This package contains common files shared by the distinct flavours of GRUB.

View File

@ -1,8 +1,29 @@
Description: Detect Ubuntu's use of "recovery" rather than "single" Description: "single" -> "recovery" when friendly-recovery is installed
Author: Colin Watson <cjwatson@ubuntu.com> Author: Colin Watson <cjwatson@ubuntu.com>
Author: Stéphane Graber <stgraber@ubuntu.com>
Forwarded: no Forwarded: no
Last-Update: 2012-09-18 Last-Update: 2013-01-21
Index: b/util/grub.d/10_linux.in
===================================================================
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -243,8 +243,13 @@
linux_entry "${OS}" "${version}" advanced \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
- linux_entry "${OS}" "${version}" recovery \
- "single ${GRUB_CMDLINE_LINUX}"
+ if [ -x /lib/recovery-mode/recovery-menu ]; then
+ linux_entry "${OS}" "${version}" recovery \
+ "recovery ${GRUB_CMDLINE_LINUX}"
+ else
+ linux_entry "${OS}" "${version}" recovery \
+ "single ${GRUB_CMDLINE_LINUX}"
+ fi
fi
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
Index: b/util/grub.d/30_os-prober.in Index: b/util/grub.d/30_os-prober.in
=================================================================== ===================================================================
--- a/util/grub.d/30_os-prober.in --- a/util/grub.d/30_os-prober.in

View File

@ -243,8 +243,13 @@ while [ "x$list" != "x" ] ; do
linux_entry "${OS}" "${version}" advanced \ linux_entry "${OS}" "${version}" advanced \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}" "${version}" recovery \ if [ -x /lib/recovery-mode/recovery-menu ]; then
"single ${GRUB_CMDLINE_LINUX}" linux_entry "${OS}" "${version}" recovery \
"recovery ${GRUB_CMDLINE_LINUX}"
else
linux_entry "${OS}" "${version}" recovery \
"single ${GRUB_CMDLINE_LINUX}"
fi
fi fi
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '` list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`