Bug#336730: Prints error when no kernel is installed

Martin Michlmayr tbm at cyrius.com
Tue Nov 1 16:18:46 UTC 2005


* Otavio Salvador <otavio at debian.org> [2005-11-01 13:33]:
> I just added a fix for it in our svn repository. Would be good if you
> could do a try and notice me if it works great for you.
> 
>  svn co svn://svn.debian.org/svn/pkg-grub/grub/trunk grub-svn

No, you just broke it.  vmlinu_x_ vs vmlinu_z_

-for kern in $(/bin/ls -1vr /boot/vmlinuz-* | grep -v "dpkg-*") ; do
+for kern in $(/bin/ls -1vr | grep -v "dpkg-*" | grep "^vmlinux-") ; do

Also, you'll have to add /boot:

591:tbm at deprecation: ~/tmp/src/grub-svn] /bin/ls -1vr /boot/vmlinuz-* | grep -v dpkg-
/boot/vmlinuz-2.6.12-1-686
592:tbm at deprecation: ~/tmp/src/grub-svn] /bin/ls -1vr /boot | grep -v dpkg- | grep "^vmlinuz-"
vmlinuz-2.6.12-1-686

Maybe something like this on top of the current code:


Index: debian/update-grub
===================================================================
--- debian/update-grub	(revision 37)
+++ debian/update-grub	(working copy)
@@ -718,8 +718,9 @@
 fi
 
 sortedKernels=""
-for kern in $(/bin/ls -1vr | grep -v "dpkg-*" | grep "^vmlinux-") ; do
+for kern in $(/bin/ls -1vr /boot | grep -v "dpkg-*" | grep "^vmlinuz-") ; do
 	# found a kernel
+	kern="/boot/$kern"
 	newerKernels=""
 	for i in $sortedKernels ; do
 		res=$(CompareVersions "$kern" "$i")


-- 
Martin Michlmayr
http://www.cyrius.com/




More information about the Pkg-grub-devel mailing list