tags 886611 upstream thanks Hi Paul,
checking if initramfs is newer than uptime might be a good idea in general. A reboot may be also required due to updates of 3rd party kernel modules (like DKMS) if they are part of the initramfs. I would avoid to parse the initramfs in needrestart (would need to handle different compression and archive file types etc.) just to look for the microcode files. Report and recommend a reboot if there is an updated initramfs should be sufficient, shouldn't it? HTH, Thomas Paul Wise <p...@debian.org> writes: > Package: needrestart > Version: 2.11-4 > Severity: wishlist > > Please detect the need to reboot to apply AMD microcode updates. > > The amd64-microcode maintainer suggested that this could be done by > detecting that the initramfs is newer than uptime, and if so, look at > the microcode files in the package and check if they are newer than > uptime but older than the initramfs. If the microcode files are newer > than the initramfs and newer than the uptime there could be a warning. > > $ apt-file show amd64-microcode | grep ucode > amd64-microcode: /lib/firmware/amd-ucode/microcode_amd.bin > amd64-microcode: /lib/firmware/amd-ucode/microcode_amd_fam15h.bin > amd64-microcode: /lib/firmware/amd-ucode/microcode_amd_fam16h.bin > > This might require packaging the Unix::Uptime CPAN module: > > https://metacpan.org/pod/Unix::Uptime > https://github.com/pioto/Unix-Uptime > > Until that happens, you could parse /proc/uptime manually. > > -- > bye, > pabs > > https://wiki.debian.org/PaulWise -- :: WWW: https://fiasko-nw.net/~thomas/ :: ::: Jabber: xmpp:tho...@jabber.fiasko-nw.net ::: :: flickr: https://www.flickr.com/photos/laugufe/ ::