[Bug 14908] Re: swsusp fails after automatic kernel upgrade

John Cooper ubuntu at choffee.co.uk
Mon Apr 10 13:35:30 UTC 2006


Hi,

At first glance I added this to the top of /etc/acpi/hibernate.sh.

grubkern=`awk  'BEGIN { kern=0 } {if ( $1 == "default" ) f=$2; if ( $1 == "kernel" ) if ( f == kern ) { gsub(".*z-","",$2 ) ;print $2 ; ( kern = kern + 1 ) }  }'  /boot/grub/menu.lst`

if [ $grubkern != `uname -r` ] ; then exit 1 ; fi

It just checks the default kernel is the same as the running one. Pretty hacky but it works! Might be nice if it could return a messages to the user somehow rather than just quitting.

In the end I thought that maybe grub-update should perhaps write out a file when it notices a change in default kernel.




-- 
swsusp fails after automatic kernel upgrade
https://launchpad.net/malone/bugs/14908




More information about the kernel-team mailing list