From a27d7d5de30db1d14f00d7edf48292e01eac247d Mon Sep 17 00:00:00 2001 From: Gitea Date: Fri, 8 Jul 2022 10:13:19 +0200 Subject: [PATCH] committing changes in /etc after apt run Package changes: +debsums 3.0.2 all +libfile-fnmatch-perl 0.02-2+b8 amd64 --- .etckeeper | 4 ++++ cron.daily/debsums | 27 +++++++++++++++++++++++++++ cron.monthly/debsums | 27 +++++++++++++++++++++++++++ cron.weekly/debsums | 27 +++++++++++++++++++++++++++ default/debsums | 10 ++++++++++ 5 files changed, 95 insertions(+) create mode 100755 cron.daily/debsums create mode 100755 cron.monthly/debsums create mode 100755 cron.weekly/debsums create mode 100644 default/debsums diff --git a/.etckeeper b/.etckeeper index abd79963..70769b23 100755 --- a/.etckeeper +++ b/.etckeeper @@ -432,6 +432,7 @@ maybe chmod 0755 'cron.daily/00logwatch' maybe chmod 0755 'cron.daily/apt-compat' maybe chmod 0755 'cron.daily/chkrootkit' maybe chmod 0755 'cron.daily/cracklib-runtime' +maybe chmod 0755 'cron.daily/debsums' maybe chmod 0755 'cron.daily/dpkg' maybe chmod 0755 'cron.daily/etckeeper' maybe chmod 0755 'cron.daily/logrotate' @@ -443,8 +444,10 @@ maybe chmod 0755 'cron.hourly' maybe chmod 0644 'cron.hourly/.placeholder' maybe chmod 0755 'cron.monthly' maybe chmod 0644 'cron.monthly/.placeholder' +maybe chmod 0755 'cron.monthly/debsums' maybe chmod 0755 'cron.weekly' maybe chmod 0644 'cron.weekly/.placeholder' +maybe chmod 0755 'cron.weekly/debsums' maybe chmod 0755 'cron.weekly/man-db' maybe chmod 0755 'cron.weekly/rkhunter' maybe chmod 0644 'crontab' @@ -461,6 +464,7 @@ maybe chmod 0644 'default/amavisd-snmp-subagent' maybe chmod 0644 'default/console-setup' maybe chmod 0644 'default/cron' maybe chmod 0644 'default/dbus' +maybe chmod 0644 'default/debsums' maybe chmod 0644 'default/dovecot' maybe chmod 0644 'default/fail2ban' maybe chmod 0644 'default/grub' diff --git a/cron.daily/debsums b/cron.daily/debsums new file mode 100755 index 00000000..9f5fa7f5 --- /dev/null +++ b/cron.daily/debsums @@ -0,0 +1,27 @@ +#!/bin/sh + +debsums="/usr/bin/debsums" +ignorefile="/etc/debsums-ignore" + +[ -x $debsums ] || exit 0 + +if ! [ -e "$ignorefile" ]; then + ignorefile="/dev/null" +fi + +# source our config +. /etc/default/debsums +[ "z$CRON_CHECK" = "zdaily" ] || exit 0 + +# See ionice(1) +if [ -x /usr/bin/ionice ] && + /usr/bin/ionice -c3 true 2>/dev/null; then + IONICE="/usr/bin/ionice -c3" +fi + +exec 3>&1 + +$IONICE $debsums -cs 2>&1 | egrep -vf "$ignorefile" | tee /proc/self/fd/3 | sed 's/^debsums: //' | logger -t debsums + +# Exit with a normal status code even if errors (which could be ignored) were found +exit 0 diff --git a/cron.monthly/debsums b/cron.monthly/debsums new file mode 100755 index 00000000..502a0e49 --- /dev/null +++ b/cron.monthly/debsums @@ -0,0 +1,27 @@ +#!/bin/sh + +debsums="/usr/bin/debsums" +ignorefile="/etc/debsums-ignore" + +[ -x $debsums ] || exit 0 + +if ! [ -e "$ignorefile" ]; then + ignorefile="/dev/null" +fi + +# source our config +. /etc/default/debsums +[ "z$CRON_CHECK" = "zmonthly" ] || exit 0 + +# See ionice(1) +if [ -x /usr/bin/ionice ] && + /usr/bin/ionice -c3 true 2>/dev/null; then + IONICE="/usr/bin/ionice -c3" +fi + +exec 3>&1 + +$IONICE $debsums -cs 2>&1 | egrep -vf "$ignorefile" | tee /proc/self/fd/3 | sed 's/^debsums: //' | logger -t debsums + +# Exit with a normal status code even if errors (which could be ignored) were found +exit 0 diff --git a/cron.weekly/debsums b/cron.weekly/debsums new file mode 100755 index 00000000..c26a4fe5 --- /dev/null +++ b/cron.weekly/debsums @@ -0,0 +1,27 @@ +#!/bin/sh + +debsums="/usr/bin/debsums" +ignorefile="/etc/debsums-ignore" + +[ -x $debsums ] || exit 0 + +if ! [ -e "$ignorefile" ]; then + ignorefile="/dev/null" +fi + +# source our config +. /etc/default/debsums +[ "z$CRON_CHECK" = "zweekly" ] || exit 0 + +# See ionice(1) +if [ -x /usr/bin/ionice ] && + /usr/bin/ionice -c3 true 2>/dev/null; then + IONICE="/usr/bin/ionice -c3" +fi + +exec 3>&1 + +$IONICE $debsums -cs 2>&1 | egrep -vf "$ignorefile" | tee /proc/self/fd/3 | sed 's/^debsums: //' | logger -t debsums + +# Exit with a normal status code even if errors (which could be ignored) were found +exit 0 diff --git a/default/debsums b/default/debsums new file mode 100644 index 00000000..26c636a8 --- /dev/null +++ b/default/debsums @@ -0,0 +1,10 @@ +# Defaults for debsums cron jobs +# sourced by /etc/cron.d/debsums + +# +# This is a POSIX shell fragment +# + +# Set this to never to disable the checksum verification or +# one of "daily", "weekly", "monthly" to enable it +CRON_CHECK=never