Yes, that is the core of what the script makes use of. Here is a partial snippet of the code that looks at it:
Code:
PKGS=$(echo $APTRES | cut -f1 -d';')
SEC=$(echo $APTRES | cut -f2 -d';')
if [ -f /var/run/reboot-required ]; then
REBOOT=1
TOAPPLY=`cat /var/run/reboot-required.pkgs`
else
REBOOT=0
fi
if [ "${PKGS}" -eq 0 ]; then
if [ "${REBOOT}" -eq 1 ]; then
RET=$STATE_WARNING
RESULT="Reboot required to apply ${TOAPPLY}"
else
RET=$STATE_OK
RESULT="No packages to be updated"
fi
elif [ "${SEC}" -eq 0 ]; then
RET=$STATE_WARNING
RESULT="${PKGS} packages to update (no security updates)"
else
RET=$STATE_CRITICAL
RESULT="${PKGS} packages (including ${SEC} security) packages to update"
fi
echo $RESULT
EDIT:
libssl1.0.0 is one of those patches that would not have been automatically applied in my apt upgrade script since it is not listed as a security patch. You only get that one if you type something like aptitude safe-upgrade
Bookmarks