summaryrefslogtreecommitdiff
path: root/sitemodules/profiles/files/base/etckeeper_post_command.sh
diff options
context:
space:
mode:
authorJan Dittberner <jandd@cacert.org>2019-08-13 12:17:48 +0200
committerJan Dittberner <jandd@cacert.org>2019-08-13 12:17:48 +0200
commit5ec12c8fbdb6fbfc163ea9197be4489d3c76721e (patch)
treedf471c8431d8c5e232eaf293541c3cd41b2ddd1c /sitemodules/profiles/files/base/etckeeper_post_command.sh
parentd69ce91bacfe333aef72d1fcbb7b36cb30cf3019 (diff)
downloadcacert-puppet-5ec12c8fbdb6fbfc163ea9197be4489d3c76721e.tar.gz
cacert-puppet-5ec12c8fbdb6fbfc163ea9197be4489d3c76721e.tar.xz
cacert-puppet-5ec12c8fbdb6fbfc163ea9197be4489d3c76721e.zip
Define a postrun command for puppet runs
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