Created
April 28, 2016 19:17
-
-
Save colby/5f980d3ba3977203391dedb444d0f444 to your computer and use it in GitHub Desktop.
A package upgrade checking script.
This file contains hidden or 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
#!/bin/bash | |
file=/tmp/packages | |
/usr/lib/update-notifier/apt-check --human-readable | |
[ -f /var/run/reboot-required ] && echo -e "\nA reboot is required!" | |
apt list --upgradable > $file 2>/dev/null | |
echo -e "\nNormal package updates:" | |
pr -T -c3 -a <(grep 'update' $file | cut -d/ -f1) | |
echo -e "\nSecurity package updates:" | |
pr -T -c3 -a <(grep 'security' $file | cut -d/ -f1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$ ./utility/scripts/apt/package_check.sh 250 packages can be updated. 147 updates are security updates. A reboot is required! Normal package updates: accountsservice apport apt apt-transport-https apt-utils augeas-lenses base-files bash bash-completion bind9-host binutils bsdutils byobu ca-certificates cloud-guest-utils cloud-init coreutils cpio curl dbus dh-python dkms dnsutils dpkg ... Security package updates: apt apt-transport-https apt-utils bash bind9-host ca-certificates cloud-init cpio curl dbus dkms dnsutils dpkg dpkg-dev file fuse gnupg gpgv