Package: grub-common Version: 1.97~beta3-1 Severity: wishlist Tags: patch Hello, I think, that howmany is good feature in grub-legacy. This option specifies number of kernels, that user wants to have in boot menu. I have created small patch, that adds support for this to 10_linux. There should be variable GRUB_HOW_MANY propagated from /etc/default/grub (my patch don't do this). Kernel and it's rescue variant is counted as one kernel.
Thanks in advance -- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.30 Locale: LANG=cs_CZ.UTF-8, LC_CTYPE=cs_CZ.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages grub-common depends on: ii base-files 5.0.0 Debian base system miscellaneous f ii libc6 2.9-25 GNU C Library: Shared libraries ii libfreetype6 2.3.9-5 FreeType 2 font engine, shared lib ii libncurses5 5.7+20090803-2 shared libraries for terminal hand ii zlib1g 1:1.2.3.3.dfsg-15 compression library - runtime Versions of packages grub-common recommends: ii os-prober 1.28 utility to detect other OSes on a Versions of packages grub-common suggests: pn multiboot-doc <none> (no description available) -- no debconf information -- Jezz mail: [email protected] jabber: [email protected]
--- 10_linux 2009-08-10 19:49:44.000000000 +0200
+++ 10_linux.new 2009-09-27 16:09:49.490014838 +0200
@@ -66,7 +66,17 @@
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done`
-while [ "x$list" != "x" ] ; do
+# Validate GRUB_HOW_MANY variable
+case "$GRUB_HOW_MANY" in
+ [0-9]|[0-9][0-9])
+ howmany=$GRUB_HOW_MANY
+ ;;
+ *)
+ howmany=99
+ ;;
+esac
+
+while [ "x$list" != "x" -a $howmany -gt 0 ] ; do
linux=`version_find_latest $list`
echo "Found linux image: $linux" >&2
basename=`basename $linux`
@@ -75,6 +85,7 @@
version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
alt_version=`echo $version | sed -e "s,\.old$,,g"`
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
+ howmany=$((howmany-1))
initrd=
for i in "initrd.img-${version}" "initrd-${version}.img" \
signature.asc
Description: Digital signature

