Hi, the company I work for has a script on SLES/SuSE, that checks the following three kernel versions
- latest version available in the repository - version installed in /boot and thus likely to be loaded on next boot - version running and warns (and/or fixes) if there is a mismatch. I've been trying to think of a way to do the same, but failed so far. Latest version available in the repository is easy enough, just check for the version the metapackage depends on (or, even easier, check for updates of the kernel package). Checking for the version in /boot is semi-easy (check the package version installed and hope the user did not fiddle with grub), too. The hard part seems to be matching the running kernel against the version installed. I cannot figure out a good way so far. Nothing in the running kernel seems to show the Debian version (i.e. 2.6.32-41squeeze2), thus I cannot compare it. It is printed in the bootup messages [ 0.000000] Linux version 2.6.32-5-amd64 (Debian 2.6.32-39squeeze1) ([email protected]) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Mon Jan 9 20:49:59 UTC 2012 but that might be long gone when I check. I could not find this version string in /proc or /sys yet. Any idea how to solve that? Bernhard -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

