John E. Krokes noticed that the grub configuration fragment that we ship
outputs text to stdout, which means it will end up being part of the
generated grub configuration. This is wrong, and leads to error messages
during boot like "error: can't find command `Including'."...
Instead, output informational messages about progress to stderr (exactly
like what happens with other messages such as "Generating grub
configuration file ..." or "Found linux image: /boot/vmlinuz-[...]").
For the more prominent message about changing GRUB_DEFAULT as a side
effect, use the grub_warn helper instead.
(Closes: #
1016547)
# The configuration in here makes it possible to have different options set
# for the linux kernel when booting with or without Xen.
-echo "Including Xen overrides from /etc/default/grub.d/xen.cfg"
+echo "Including Xen overrides from /etc/default/grub.d/xen.cfg" >&2
#######################################################################
# Xen Hypervisor Command Line Options
#XEN_OVERRIDE_GRUB_DEFAULT=
#
if [ "$XEN_OVERRIDE_GRUB_DEFAULT" = "" ]; then
- echo "WARNING: GRUB_DEFAULT changed to boot into Xen by default!"
- echo " Edit /etc/default/grub.d/xen.cfg to avoid this warning."
+ grub_warn "GRUB_DEFAULT changed to boot into Xen by default!" \
+ "Edit /etc/default/grub.d/xen.cfg to avoid this warning."
XEN_OVERRIDE_GRUB_DEFAULT=1
fi
if [ "$XEN_OVERRIDE_GRUB_DEFAULT" = "1" ]; then