Package: etckeeper
Severity: wishlist
Version: 0.28
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch jaunty

etckeeper already autocommits pre/post package installation
modifications. It could also offer a daily cronjob to catch uncommitted
modifications every night. This would allow much better default tracking.

This should be optional, though I would argue it should be "on" by
default, since those that would most likely need it are the ones that
would not touch the configuration file anyway.

See attached patch for proposed implementation.
Hope this helps,

-- 
Thierry Carrez


--- debian/control	2009-01-27 10:41:15 +0000
+++ debian/control	2009-01-27 12:25:20 +0000
@@ -12,6 +12,7 @@
 Architecture: all
 Section: admin
 Depends: git-core (>= 1:1.5.4) | mercurial | bzr (>= 1.4~) | darcs, ${misc:Depends}
+Recommends: cron
 Conflicts: bzr (<< 1.4~)
 XB-Python-Version: ${python:Versions}
 Description: store /etc in git, mercurial, bzr or darcs

--- debian/cron.daily	1970-01-01 00:00:00 +0000
+++ debian/cron.daily	2009-01-27 12:25:20 +0000
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+. /etc/etckeeper/etckeeper.conf
+if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then
+	if /usr/sbin/etckeeper unclean; then
+		/usr/sbin/etckeeper commit "Daily autocommit"
+	fi
+fi

--- etckeeper.conf	2009-01-25 15:53:58 +0000
+++ etckeeper.conf	2009-01-28 13:55:41 +0000
@@ -16,6 +16,10 @@
 # Options passed to darcs commit when run by etckeeper.
 #DARCS_COMMIT_OPTIONS=""
 
+# Uncomment to avoid etckeeper committing existing changes
+# to /etc automatically once per day.
+#AVOID_DAILY_AUTOCOMMITS=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.

Reply via email to