From cf93c642072939bac80fd2a50f05705959ba1f91 Mon Sep 17 00:00:00 2001 From: Benedikt Böhm Date: Mon, 20 Jul 2009 10:10:07 +0200 Subject: add GLSA report --- bin/porticron | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/bin/porticron b/bin/porticron index 3a1c0bb..3761e30 100755 --- a/bin/porticron +++ b/bin/porticron @@ -82,3 +82,41 @@ ${DIFF_MSG}${UPGRADE_MSG} -- ${SCRIPT_NAME} EOF + + +# GLSA check +GLSA_AFFECTED=$(/usr/bin/glsa-check --test --verbose affected 2>/dev/null) +GLSA_UPGRADES=$(/usr/bin/glsa-check --pretend affected | grep '^ ') + +if [[ -n ${GLSA_AFFECTED} ]]; then + GLSA_MSG=" +${SCRIPT_NAME} has detected that this system is affected by the following GLSAs: + +$(echo "${GLSA_AFFECTED}" | sed 's/^20/ 20/') + +======================================================================== + +The following updates should be performed for these GLSAs: + +${GLSA_UPGRADES} +" +fi + + +# send mail +if [[ -z ${GLSA_MSG} ]]; then + exit 0 +fi + +cat <