From 7c734b05adf5a98be134008dfd7b5cc2c2b5a81d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 17 May 2016 10:34:27 -0400 Subject: refactor daily script --- debian/cron.daily | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'debian') diff --git a/debian/cron.daily b/debian/cron.daily index 5255691..e00e570 100644 --- a/debian/cron.daily +++ b/debian/cron.daily @@ -1,19 +1,5 @@ #!/bin/sh set -e -if [ -x /usr/bin/etckeeper ] && [ -e /etc/etckeeper/etckeeper.conf ]; then - . /etc/etckeeper/etckeeper.conf - if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then - # avoid autocommit if an install run is in progress - lockfile=/var/cache/etckeeper/packagelist.pre-install - if [ -e "$lockfile" ] && [ -n "$(find "$lockfile" -mtime +1)" ]; then - rm -f "$lockfile" # stale - fi - if [ ! -e "$lockfile" ]; then - AVOID_SPECIAL_FILE_WARNING=1 - export AVOID_SPECIAL_FILE_WARNING - if etckeeper unclean; then - etckeeper commit "daily autocommit" >/dev/null - fi - fi - fi +if [ -e /etc/etckeeper/daily ]; then + /etc/etckeeper/daily fi -- cgit v1.2.3