LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Howto monitor a new kernel installed but not yet used (http://www.linuxquestions.org/questions/linux-software-2/howto-monitor-a-new-kernel-installed-but-not-yet-used-747735/)

wikapuki 08-15-2009 06:36 AM

Howto monitor a new kernel installed but not yet used
 
debian Linux i686 perl

I have a little perl script (I wrote it) that monitors my house (X10, IR, networks etc) and speaks via festival when things change or are changed by me (for confirmation).

Today squeeze got a new kernel version, now she knows that she is running Linux 2.6.26-2-486 i686 however an update has happened and a new version is installed, Linux 2.6.30-1-486 i686, which will be in use on the next boot up.

What I would like to do is find the correct way to determine this event has happened so she can ask me permission to reboot.

Apart from monitoring the grub file menu.1st mod time and then parsing for changes and considering this is about to change cos of GRUB2, is there a more standard way I should use?

wikapuki 08-15-2009 06:46 AM

Was also thinking of just doing a directory listing of /boot for initrd.img* files.

syg00 08-15-2009 06:46 AM

inotify{watch} on /boot/grub ?.

wikapuki 08-15-2009 07:10 AM

Thanks for that, will use it later as migrating Arnie (name of monitoring script) over to mono type c thingy bobby, currently use Log::Log4perl::Config::Watch in Arnie for watching files etc

my $grubfile = Log::Log4perl::Config::Watch->new(file => "/boot/grub/menu.lst", check_interval => 60);

I was just hoping there was some sort of linux New kernel pending standard.

Cheers


All times are GMT -5. The time now is 03:08 AM.