etckeeperで/var/named/を管理

タイトルの通りなんだけども、RHEL 7.3 + etckeeper-1.18.5-1.el7だと設定方法がググった結果と少し違ったので。

# etckeeper init -d /var/named/
# etckeeper commit -d /var/named/ "Initial Commit"

Dailyの自動保存は以下。

# etckeeper vcs diff HEAD^ HEAD
diff --git a/etckeeper/daily b/etckeeper/daily
index f98c6ad..16def11 100755
--- a/etckeeper/daily
+++ b/etckeeper/daily
@@ -13,5 +13,8 @@ if [ -x /usr/bin/etckeeper ] && [ -e /etc/etckeeper/etckeeper.conf ]; then
                if etckeeper unclean; then
                        etckeeper commit "daily autocommit" >/dev/null
                fi
+               if etckeeper unclean -d /var/named/; then
+                       etckeeper commit -d /var/named/ "daily autocommit" >/dev/null
+               fi
        fi
 fi

タイトルとURLをコピーしました