diff --git a/roles/base/files/usr/lib/check_mk_agent/plugins/dpkg b/roles/base/files/usr/lib/check_mk_agent/plugins/dpkg index caba2b2..6c619dd 100755 --- a/roles/base/files/usr/lib/check_mk_agent/plugins/dpkg +++ b/roles/base/files/usr/lib/check_mk_agent/plugins/dpkg @@ -23,7 +23,7 @@ DEBIAN_VERSION="$( cat /etc/debian_version )" TOTAL_PACKAGES=$( head --lines=1 <<<"${TMP_AWK}" ) UPGRADABLE_PACKAGES=( $( apt list --upgradable 2>/dev/null | grep -v '^Listing' | awk '{ gsub(/\]/,"",$NF); print $1 "[" $NF "<>" $2 "]" }' ) ) INCONSISTENT_PACKAGES=( $( tail --lines=+2 <<<"${TMP_AWK}" ) ) -OLD_CONFIG_FILES=( $( ionice -c3 find /etc -type f -a \( -name '*.dpkg-*' -o -name '*.ucf-*' \) 2>/dev/null ) ) +OLD_CONFIG_FILES=( $( ionice -c3 find /etc -type f -a \( -name '*.dpkg-*' -o -name '*.ucf-*' -o -name '*.update-*' \) 2>/dev/null ) ) echo "<<>>" echo "debian_version ${DEBIAN_VERSION}" diff --git a/roles/base/templates/usr/local/sbin/dpkg-cleanup.sh.j2 b/roles/base/templates/usr/local/sbin/dpkg-cleanup.sh.j2 index e5af7d2..8bd7de0 100755 --- a/roles/base/templates/usr/local/sbin/dpkg-cleanup.sh.j2 +++ b/roles/base/templates/usr/local/sbin/dpkg-cleanup.sh.j2 @@ -16,5 +16,5 @@ apt autoremove --purge -y apt clean # Phase 4 - find and remove obsolete config files -OLD_FILES_LIST=( $( find /etc -type f -a \( -name '*.dpkg-*' -o -name '*.ucf-*' \) 2>/dev/null ) ) +OLD_FILES_LIST=( $( find /etc -type f -a \( -name '*.dpkg-*' -o -name '*.ucf-*' -o -name '*.update-*' \) 2>/dev/null ) ) rm -f ${OLD_FILES_LIST[@]}