Bug#298110: grub: Custom title in menu.lst
Free Ekanayaka
Free Ekanayaka <free@agnula.org>, 298110@bugs.debian.org
Fri, 04 Mar 2005 20:04:20 +0100
Package: grub
Version: 0.95+cvs20040624-13
Severity: wishlist
Tags: patch
File: /sbin/update-grub
Hi,
it would be nice to be able to set a custom title for the menu.list entries.
The patch below lets override the variable "title" (and possibly other
ones) via /etc/default/grub.
Cheers,
Free
--- /sbin/update-grub 2005-01-16 23:20:51.000000000 +0100
+++ update-grub 2005-03-04 19:56:34.000000000 +0100
@@ -237,6 +237,9 @@
# Default kernel options, overidden by the kopt statement in the menufile.
kopt="root=$root_device ro"
+# Title
+title="Debian GNU/Linux"
+
# Drive(in GRUB terms) where the kernel is located. Overridden by the
# kopt statement in menufile.
# if we don't have a device.map then we can't use the convert function.
@@ -269,6 +272,11 @@
# stores the command line arguments
command_line_arguments=$1
+# read user configuration
+if test -f "/etc/default/grub" ; then
+ . /etc/default/grub
+fi
+
# Default options to use in a new menu.lst . This will only be used if menu.lst
# doesn't already exist. Only edit the lines between the two "EOF"s. The others are
# part of the script.
@@ -522,7 +530,7 @@
recovery_suffix=$7
initrd=$8
- echo "title Debian GNU/Linux, kernel $kernel_version $recovery_desc" >> $buffer
+ echo "title $title, kernel $kernel_version $recovery_desc" >> $buffer
# lock the alternative options
if test x"$lock_alternative" = x"true" ; then