From d67db662d8f0e1c65de0ec229bdcf61bf0c1996a Mon Sep 17 00:00:00 2001
From: Chris Weyl <cweyl@alumni.drew.edu>
Date: Thu, 28 Feb 2013 17:27:08 -0800
Subject: [PATCH 1/2] add etckeeper {pre,post}run_commands to generated
 puppet.conf

This allows automatic integration with the etckeeper system, if it is present
and configured.  AFAIK this is the only way available to track /etc changes
pre/post a puppet apply run; but even if not it's very common and useful :)

The etckeeper scripts are supplied (and enabled by default) by the ubuntu
puppet-common package.
---
 puppet-git-receiver-update-hook | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/puppet-git-receiver-update-hook b/puppet-git-receiver-update-hook
index 23e28fb..0cae18e 100755
--- a/puppet-git-receiver-update-hook
+++ b/puppet-git-receiver-update-hook
@@ -152,6 +152,8 @@ cat <<EOF > "${confdir}/puppet.conf"
   node_terminus = exec
   external_nodes = `pwd`/$0
   templatedir=${DEST}/templates
+  prerun_command=/etc/puppet/etckeeper-commit-pre
+  postrun_command=/etc/puppet/etckeeper-commit-post
 EOF
 
 notice "Applying puppet manifests"

From 83fb13209adad314c5d24012dadecc14bd4bd92a Mon Sep 17 00:00:00 2001
From: Chris Weyl <cweyl@alumni.drew.edu>
Date: Thu, 28 Feb 2013 17:32:12 -0800
Subject: [PATCH 2/2] yeah, I'm a little alignment pedantic :)

---
 puppet-git-receiver-update-hook | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/puppet-git-receiver-update-hook b/puppet-git-receiver-update-hook
index 0cae18e..e83b769 100755
--- a/puppet-git-receiver-update-hook
+++ b/puppet-git-receiver-update-hook
@@ -149,11 +149,11 @@ mkdir -p $confdir/ssl
 
 cat <<EOF > "${confdir}/puppet.conf"
 [main]
-  node_terminus = exec
-  external_nodes = `pwd`/$0
-  templatedir=${DEST}/templates
-  prerun_command=/etc/puppet/etckeeper-commit-pre
-  postrun_command=/etc/puppet/etckeeper-commit-post
+  node_terminus   = exec
+  external_nodes  = `pwd`/$0
+  templatedir     = ${DEST}/templates
+  prerun_command  = /etc/puppet/etckeeper-commit-pre
+  postrun_command = /etc/puppet/etckeeper-commit-post
 EOF
 
 notice "Applying puppet manifests"