Skip to content

Instantly share code, notes, and snippets.

@hansdg1
Created November 13, 2016 21:34
Show Gist options
  • Save hansdg1/a2b6e683650381971e489512aff5b378 to your computer and use it in GitHub Desktop.
Save hansdg1/a2b6e683650381971e489512aff5b378 to your computer and use it in GitHub Desktop.
Check ubuntu/debian has a reboot pending. If so, print details
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"
@hansdg1
Copy link
Author

hansdg1 commented Nov 13, 2016

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