summaryrefslogtreecommitdiff
path: root/debian/postinst
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-07-08 14:40:11 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-07-08 14:40:11 -0400
commitb6903b7897e050cdbb63a37c696fb1f4c9f0c752 (patch)
treecc254b16e2f4b9d837f04346f5ee97ec70b2d043 /debian/postinst
parent51a2682158fe2ae7ca7283d2bf2addeedfd82460 (diff)
Automatically commit on initial install, so users can begin relying on etckeeper right away. Closes: #533290
Diffstat (limited to 'debian/postinst')
-rw-r--r--debian/postinst8
1 files changed, 7 insertions, 1 deletions
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