summaryrefslogtreecommitdiff
path: root/sitemodules/profiles/files/base/etckeeper_post_command.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sitemodules/profiles/files/base/etckeeper_post_command.sh')
-rw-r--r--sitemodules/profiles/files/base/etckeeper_post_command.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/sitemodules/profiles/files/base/etckeeper_post_command.sh b/sitemodules/profiles/files/base/etckeeper_post_command.sh
new file mode 100644
index 0000000..ec10155
--- /dev/null
+++ b/sitemodules/profiles/files/base/etckeeper_post_command.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+if etckeeper unclean; then
+ if ! etckeeper commit "saving uncommitted changes in /etc after puppet run"; then
+ echo "warning: etckeeper failed to commit changes in /etc using $VCS" >&2
+ fi
+fi