Expand description
Pending-reboot detection action (Ubuntu / Debian).
§CheckPendingReboot
Checks whether a reboot is pending by inspecting
/var/run/reboot-required. When a kernel or glibc update is installed via
apt, the installer touches that file. If the file exists this action also
cats /var/run/reboot-required-pkgs (which lists the packages that require
the reboot) so the operator sees the full picture in one step.
§Why Ubuntu-only?
On Fedora/Silverblue the equivalent information is surfaced through
rpm-ostree status --json (field deployments[0].staged). That path is
already covered by the existing GetPendingUpdates action in the Fedora
action catalogue. Adding a cross-distro CheckPendingReboot action would
require runtime distro detection inside the executor — a 50-line refactor
with no architectural precedent in the codebase. Path (b) from the spec
was therefore chosen: CheckPendingReboot covers Debian/Ubuntu, and
Fedora operators use GetPendingUpdates. The prompt places
CheckPendingReboot in DEBIAN_RISK_TABLES and notes the Fedora
equivalent in DEBIAN_SELECTION_RULES.
Functions§
- check_
pending_ reboot - Check whether a system reboot is pending on a Debian/Ubuntu host.
- specs
- Return one representative
ActionSpecfor this module.