Add uncommitted etckeeper-* things
authorPeter Palfrader <peter@palfrader.org>
Sun, 7 Feb 2016 09:55:05 +0000 (09:55 +0000)
committerPeter Palfrader <peter@palfrader.org>
Sun, 7 Feb 2016 09:55:05 +0000 (09:55 +0000)
etckeeper-commit-post [new file with mode: 0755]
etckeeper-commit-pre [new file with mode: 0755]

diff --git a/etckeeper-commit-post b/etckeeper-commit-post
new file mode 100755 (executable)
index 0000000..489b2bd
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+
+which etckeeper > /dev/null 2>&1 || exit 0
+
+etckeeper commit "committing changes in /etc after puppet catalog run"
+
+# Failure of etckeeper should not be fatal.
+exit 0
diff --git a/etckeeper-commit-pre b/etckeeper-commit-pre
new file mode 100755 (executable)
index 0000000..a66fb62
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+
+which etckeeper > /dev/null 2>&1 || exit 0
+
+etckeeper commit "saving uncommitted changes in /etc prior to puppet catalog run"
+
+# Failure of etckeeper should not be fatal.
+exit 0