summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog2
-rw-r--r--debian/postinst8
2 files changed, 9 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index b80418b..fc1736a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
etckeeper (0.38) UNRELEASED; urgency=low
* Use hostname if hostname -f fails. Closes: #533295
+ * Automatically commit on initial install, so users can
+ begin relying on etckeeper right away. Closes: #533290
-- Joey Hess <joeyh@debian.org> Sun, 28 Jun 2009 16:29:17 -0400
diff --git a/debian/postinst b/debian/postinst
index c87a713..496a5d8 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -77,7 +77,13 @@ configure)
# Fresh install.
. /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
+ if etckeeper init; then
+ if ! etckeeper commit "Initial commit"; then
+ echo "etckeeper commit failed; run it by hand" >&2
+ fi
+ else
+ echo "etckeeper init failed; run it by hand" >&2
+ fi
else
echo "etckeeper init not ran as $VCS is not installed" >&2
fi