diff options
author | Joey Hess <joey@kitenet.net> | 2011-06-19 15:19:03 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-06-19 15:19:03 -0400 |
commit | ad3fbb8d31894bfbff30e143dc18e85eed5afd20 (patch) | |
tree | 1b339cb4baf6deeb600f9cef23c60bd2a9f654ee | |
parent | c5c7cc002e05108ae3434a328cd0f2507908787a (diff) |
Add AVOID_SPECIAL_FILE_WARNING to config file, and set it in cron job to avoid daily noise. (gulikoza)
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/cron.daily | 2 | ||||
-rwxr-xr-x | etckeeper | 3 | ||||
-rw-r--r-- | etckeeper.conf | 4 | ||||
-rwxr-xr-x | pre-commit.d/20warn-problem-files | 4 |
5 files changed, 13 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index c550f3d..3bc2b0c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,8 @@ etckeeper (0.55) UNRELEASED; urgency=low (Tuomo Soini) * Ignore FHS violating prelink.cache and openvpn-status.log. * Ignore *.LOCK files, as used by selinux policies. + * Add AVOID_SPECIAL_FILE_WARNING to config file, and set it in cron + job to avoid daily noise. (gulikoza) -- Joey Hess <joeyh@debian.org> Tue, 31 May 2011 17:34:54 -0400 diff --git a/debian/cron.daily b/debian/cron.daily index 91e2ed4..b46e7a2 100644 --- a/debian/cron.daily +++ b/debian/cron.daily @@ -5,6 +5,8 @@ if [ -x /usr/bin/etckeeper ] && [ -e /etc/etckeeper/etckeeper.conf ]; then if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then # avoid autocommit if an install run is in progress if [ ! -e /var/cache/etckeeper/packagelist.pre-install ]; then + AVOID_SPECIAL_FILE_WARNING=1 + export AVOID_SPECIAL_FILE_WARNING if etckeeper unclean; then etckeeper commit "daily autocommit" >/dev/null fi @@ -50,6 +50,9 @@ fi if [ ! -z "$AVOID_COMMIT_BEFORE_INSTALL" ]; then export AVOID_COMMIT_BEFORE_INSTALL fi +if [ ! -z "$AVOID_SPECIAL_FILE_WARNING" ]; then + export AVOID_SPECIAL_FILE_WARNING +fi if [ -z "$1" ]; then usage diff --git a/etckeeper.conf b/etckeeper.conf index be8934d..c95f377 100644 --- a/etckeeper.conf +++ b/etckeeper.conf @@ -20,6 +20,10 @@ DARCS_COMMIT_OPTIONS="-a" # to /etc automatically once per day. #AVOID_DAILY_AUTOCOMMITS=1 +# Uncomment the following to avoid special file warning +# (the option is enabled automatically by cronjob regardless). +#AVOID_SPECIAL_FILE_WARNING=1 + # Uncomment to avoid etckeeper committing existing changes to # /etc before installation. It will cancel the installation, # so you can commit the changes by hand. diff --git a/pre-commit.d/20warn-problem-files b/pre-commit.d/20warn-problem-files index d600ff6..f7c7580 100755 --- a/pre-commit.d/20warn-problem-files +++ b/pre-commit.d/20warn-problem-files @@ -18,11 +18,11 @@ else special="" fi -if [ -n "$special" ]; then +if [ -n "$special" ] && [ -z "$AVOID_SPECIAL_FILE_WARNING" ]; then echo "etckeeper warning: special files could cause problems with $VCS:" >&2 echo "$special" >&2 fi -if [ -n "$hardlinks" ]; then +if [ -n "$hardlinks" ] && [ -z "$AVOID_SPECIAL_FILE_WARNING" ]; then echo "etckeeper warning: hardlinked files could cause problems with $VCS:" >&2 echo "$hardlinks" >&2 fi |