* [PATCH] Support GRUB_DISABLE_LINUX_RECOVERY
@ 2009-06-17 11:23 Colin Watson
2009-06-21 11:24 ` Robert Millan
0 siblings, 1 reply; 2+ messages in thread
From: Colin Watson @ 2009-06-17 11:23 UTC (permalink / raw)
To: grub-devel
This patch fixes
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/190207.
Index: ChangeLog
===================================================================
--- ChangeLog (revision 2335)
+++ ChangeLog (working copy)
@@ -1,5 +1,10 @@
+2009-06-17 Colin Watson <cjwatson@ubuntu.com>
+
+ * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
+ variable.
+ * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
+ don't write a menu entry for recovery mode.
+
2009-06-17 Colin Watson <cjwatson@ubuntu.com>
* util/elf/grub-mkimage.c (usage): Prefix each option line with two
Index: util/grub-mkconfig.in
===================================================================
--- util/grub-mkconfig.in (revision 2335)
+++ util/grub-mkconfig.in (working copy)
@@ -173,7 +173,7 @@
export GRUB_DEVICE GRUB_DEVICE_UUID GRUB_DEVICE_BOOT GRUB_DEVICE_BOOT_UUID GRUB_FS GRUB_FONT_PATH GRUB_PRELOAD_MODULES
# These are optional, user-defined variables.
-export GRUB_DEFAULT GRUB_TIMEOUT GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_TERMINAL_INPUT GRUB_TERMINAL_OUTPUT GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID GRUB_GFXMODE
+export GRUB_DEFAULT GRUB_TIMEOUT GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_TERMINAL_INPUT GRUB_TERMINAL_OUTPUT GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID GRUB_DISABLE_LINUX_RECOVERY GRUB_GFXMODE
if test "x${grub_cfg}" != "x"; then
rm -f ${grub_cfg}.new
Index: util/grub.d/10_linux.in
===================================================================
--- util/grub.d/10_linux.in (revision 2335)
+++ util/grub.d/10_linux.in (working copy)
@@ -143,8 +143,10 @@
linux_entry "${OS}, Linux ${version}" \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
- linux_entry "${OS}, Linux ${version} (recovery mode)" \
- "single ${GRUB_CMDLINE_LINUX}"
+ if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
+ linux_entry "${OS}, Linux ${version} (recovery mode)" \
+ "single ${GRUB_CMDLINE_LINUX}"
+ fi
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
done
Thanks,
--
Colin Watson [cjwatson@ubuntu.com]
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] Support GRUB_DISABLE_LINUX_RECOVERY
2009-06-17 11:23 [PATCH] Support GRUB_DISABLE_LINUX_RECOVERY Colin Watson
@ 2009-06-21 11:24 ` Robert Millan
0 siblings, 0 replies; 2+ messages in thread
From: Robert Millan @ 2009-06-21 11:24 UTC (permalink / raw)
To: The development of GRUB 2
Committed, as this is small enough not to be copyright-significant.
Btw, Colin please use inline attachments in the future. It makes it
easier to manage.
On Wed, Jun 17, 2009 at 12:23:23PM +0100, Colin Watson wrote:
> This patch fixes
> https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/190207.
>
> Index: ChangeLog
> ===================================================================
> --- ChangeLog (revision 2335)
> +++ ChangeLog (working copy)
> @@ -1,5 +1,10 @@
> +2009-06-17 Colin Watson <cjwatson@ubuntu.com>
> +
> + * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
> + variable.
> + * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
> + don't write a menu entry for recovery mode.
> +
> 2009-06-17 Colin Watson <cjwatson@ubuntu.com>
>
> * util/elf/grub-mkimage.c (usage): Prefix each option line with two
> Index: util/grub-mkconfig.in
> ===================================================================
> --- util/grub-mkconfig.in (revision 2335)
> +++ util/grub-mkconfig.in (working copy)
> @@ -173,7 +173,7 @@
> export GRUB_DEVICE GRUB_DEVICE_UUID GRUB_DEVICE_BOOT GRUB_DEVICE_BOOT_UUID GRUB_FS GRUB_FONT_PATH GRUB_PRELOAD_MODULES
>
> # These are optional, user-defined variables.
> -export GRUB_DEFAULT GRUB_TIMEOUT GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_TERMINAL_INPUT GRUB_TERMINAL_OUTPUT GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID GRUB_GFXMODE
> +export GRUB_DEFAULT GRUB_TIMEOUT GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_TERMINAL_INPUT GRUB_TERMINAL_OUTPUT GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID GRUB_DISABLE_LINUX_RECOVERY GRUB_GFXMODE
>
> if test "x${grub_cfg}" != "x"; then
> rm -f ${grub_cfg}.new
> Index: util/grub.d/10_linux.in
> ===================================================================
> --- util/grub.d/10_linux.in (revision 2335)
> +++ util/grub.d/10_linux.in (working copy)
> @@ -143,8 +143,10 @@
>
> linux_entry "${OS}, Linux ${version}" \
> "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
> - linux_entry "${OS}, Linux ${version} (recovery mode)" \
> - "single ${GRUB_CMDLINE_LINUX}"
> + if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
> + linux_entry "${OS}, Linux ${version} (recovery mode)" \
> + "single ${GRUB_CMDLINE_LINUX}"
> + fi
>
> list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
> done
>
> Thanks,
>
> --
> Colin Watson [cjwatson@ubuntu.com]
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
--
Robert Millan
The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
how) you may access your data; but nobody's threatening your freedom: we
still allow you to remove your data and not access it at all."
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-21 11:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-17 11:23 [PATCH] Support GRUB_DISABLE_LINUX_RECOVERY Colin Watson
2009-06-21 11:24 ` Robert Millan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.