summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-05-27 14:49:01 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-05-27 14:49:01 -0400
commit0aa591164a24b34f4979f5b36df51a808ac8c3ca (patch)
tree1af7177ba27953b0ba8e2cc8b791f754a1b5b4d3
parent7768191772d4a9ce9ed9bf515c66169454e0ad63 (diff)
Make postinst check for the configured VCS before trying to run etckeeper init. Closes: #530497
-rw-r--r--debian/changelog7
-rw-r--r--debian/postinst8
2 files changed, 13 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index b79791a..5d03890 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+etckeeper (0.37) UNRELEASED; urgency=low
+
+ * Make postinst check for the configured VCS before trying to run
+ etckeeper init. Closes: #530497
+
+ -- Joey Hess <joeyh@debian.org> Wed, 27 May 2009 14:46:23 -0400
+
etckeeper (0.36) unstable; urgency=low
* Add cruft ignore file. Closes: #522513
diff --git a/debian/postinst b/debian/postinst
index 870d67b..ca0b788 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -75,8 +75,12 @@ configure)
if [ "$2" = "" ]; then
# Fresh install.
- # Might fail if, eg, git is not installed.
- etckeeper init || echo "etckeeper init failed; run it by hand" >&2
+ . /etc/etckeeper/etckeeper.conf || true
+ if [ -n "$VCS" ] && [ -x "`which $VCS 2>/dev/null`" ]; then
+ etckeeper init || echo "etckeeper init failed; run it by hand" >&2
+ else
+ echo "etckeeper init not ran as $VCS is not installed" >&2
+ fi
fi
# prints error and exits nonzero if the ignore file cannot be updated