Every so often, I'll SSH into a box with unattended-upgrades and be greeted with "** System restart required ***" with no additional information.
My '/var/run/reboot-required.pkgs' file contains:
linux-image-3.13.0-61-generic
linux-base
linux-base
linux-base
I don't mind rebooting, but I don't like rebooting without having details of WHY I should reboot in the first place. Above, I see two packages triggered the message, but there's no explanation beyond that.
Is there a way to get additional details about the reason for the reboot to also show up on SSH sign in?
Ideally, I would like to pull in a file that contains something human-readable like, "Package xyz was updated at [date/time]. It needed to modify files a, b, and c but could not because the system blocked/would block the action. During the next reboot, files a, b, and c will be replaced." But something not completely human-readable is probably okay too.
Edit: Another, probably relevant or useful article.
As you already found out you can find the packages that require a restart in
/var/run/reboot-required.pkgs
Now you just need to look in the changelog of the package to find the information you are looking for.
/usr/share/doc/${package_name}
(example:zless /usr/share/doc/linux-image-3.13.0-61-generic/changelog.Debian.gz
).apt-listchanges
to make this more convenient (1, 2, 3).Another way to do that would be to use packages.ubuntu.com.
In your case:
The file ultimately called is
/usr/lib/update-notifier/update-motd-reboot-required
(it's called by/etc/update-motd.d/98-reboot-required
).Inside the conditional if statement of one of those files, simply add this:
So, for instance, your
/usr/lib/update-notifier/update-motd-reboot-required
file would look something like this: