* util/grub.d/20_linux_xen.in: Honour GRUB_CMDLINE_LINUX_XEN_REPLACE

and GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT, which replace
GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT (complementing the
existing options which append).
* docs/grub.texi (Simple configuration): Document new options.
Reported by: Ian Jackson.  Fixes Debian bug #617538.
This commit is contained in:
Colin Watson 2011-05-17 18:10:29 +01:00
parent 3ca2b46645
commit d064b83056
3 changed files with 25 additions and 2 deletions

View file

@ -1,3 +1,12 @@
2011-05-17 Colin Watson <cjwatson@ubuntu.com>
* util/grub.d/20_linux_xen.in: Honour GRUB_CMDLINE_LINUX_XEN_REPLACE
and GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT, which replace
GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT (complementing the
existing options which append).
* docs/grub.texi (Simple configuration): Document new options.
Reported by: Ian Jackson. Fixes Debian bug #617538.
2011-05-17 Colin Watson <cjwatson@ubuntu.com>
* util/grub-fstest.c (cmd_cat): New function.

View file

@ -1169,8 +1169,14 @@ NetBSD.
@item GRUB_CMDLINE_XEN
@itemx GRUB_CMDLINE_XEN_DEFAULT
As @samp{GRUB_CMDLINE_LINUX} and @samp{GRUB_CMDLINE_LINUX_DEFAULT}, but for
Linux and Xen.
The values of these options are appended to the values of
@samp{GRUB_CMDLINE_LINUX} and @samp{GRUB_CMDLINE_LINUX_DEFAULT} for Linux
and Xen menu entries.
@item GRUB_CMDLINE_LINUX_XEN_REPLACE
@item GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT
The values of these options replace the values of @samp{GRUB_CMDLINE_LINUX}
and @samp{GRUB_CMDLINE_LINUX_DEFAULT} for Linux and Xen menu entries.
@item GRUB_DISABLE_LINUX_UUID
Normally, @command{grub-mkconfig} will generate menu entries that use

View file

@ -51,6 +51,14 @@ else
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi
# Allow overriding GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT.
if [ "${GRUB_CMDLINE_LINUX_XEN_REPLACE}" ]; then
GRUB_CMDLINE_LINUX="${GRUB_CMDLINE_LINUX_XEN_REPLACE}"
fi
if [ "${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}" ]; then
GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}"
fi
if [ "x`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true`" = xbtrfs ]; then
rootsubvol="`make_system_path_relative_to_its_root /`"
rootsubvol="${rootsubvol#/}"