How can we (more) easily determine if a kernel-change-reboot is required in Debian, other than doing this in a script (which is a bit cumbersome)?
Ubuntu has /var/run/reboot-required and per our experience it works well. However, thus far Debian (at least in Buster, 10.6) does not. Some package(s) might have done this in the past (prior to Debian Jessie) and were replaced thigns that try/claim to do it today, but we've seen nothing work (in 10.6). Details below.
Things we've tried (in Debian 10.6) with no success:
- checkrestart (no simple binary state report for kernel boot)
- needrestart (same problem as #1)
- Despite https://serverfault.com/a/667082/104173 claiming so,
/var/run/reboot-required.pkgshas not yet been visible on our Debian 10.6 system (after a kernel upgrade). - reboot-notifier does not seem to offer anything that works.
lsof | grep lib | grep DELdoes not (yet) seem to provide what we need.
"Nagios output mode" for some of the above options do not (yet) seem easily parsable.
-k, first time I'm seeing this option, thanks. I'll try it out. Question: is there an authoritative reference somewhere that specifies these0and2values, to authoritatively confirm the above translations? (eg: is this part of the Nagios definition for parsing return codes, per-p? @gf_ ) – Johnny Utahh Dec 16 '20 at 16:280maps toOK, while2maps toCritical, as per https://nagios-plugins.org/doc/guidelines.html#AEN78. Also, these return codes are configurable, as per https://github.com/liske/needrestart/blob/debian-buster/ex/needrestart.conf#L202-L214. – gxx Dec 16 '20 at 17:52needrestartappears (in a small # of test scenarios) to behave as specified above. Very cool. However:needrestartis very noisy and/or unacceptably intrusive in it's default behavior, even when used as above (as part of a script). Here's our config file changes (from/etc/needrestart/needrestart.conf's defaults) to get it to "keep quiet" and/or not get in our way (these changes were educated guesses on our part), per Debian 10.6 /needrestartv3.4 (etckeeperchange tracking): https://imgur.com/a/WtgpmgU – Johnny Utahh Dec 18 '20 at 00:44/var/run/reboot-requiredworks wonderfully in Ubuntu; can anybody offer or speculate why has it not yet been adopted in Debian? – Johnny Utahh Dec 18 '20 at 00:46