Created
November 13, 2016 21:34
-
-
Save hansdg1/a2b6e683650381971e489512aff5b378 to your computer and use it in GitHub Desktop.
Check ubuntu/debian has a reboot pending. If so, print details
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias rbr2="if [ -f /var/run/reboot-required ]; then cat /var/run/reboot-required; echo -e 'Packages pending reboot:'; cat /var/run/reboot-required.pkgs | sed 's/^/ /' ; fi" |
Sample output:
$ rbr
*** System restart required ***
Packages pending reboot:
linux-image-3.13.0-101-generic
linux-base
linux-base
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
| sed 's/^/ /'
Indents the output