keeping track of changes in /etc
using git was kind of painful as you had to configure “apt” to keep track of the changes with a “Post-Invoke” command. Determining the caller of apt was something ugly like “caller=$(ps axww | grep “^ *$$” -B3 | grep ” apt-get ” | head -n1 | sed ‘s/^.*\(apt-get .*\)/\1/’ )”. Forgetting to “chmod og-rwx /etc/.git” made your password shadows world readable. No fun at all . . .
The simple solution to all of that is called: etckeeper
It uses git per default but can use mercurial(hg), bazaar, or darcs as well. Supported packet managers are apt(dpkg), yum(rpm), pacman-g2 and probably more. Etckeeper does a commit every day per default, but as its a normal git (or hg …) one can manually commit any time (by using git directly or through “etckeeper commit message”). Everything (else) can be configured at /etc/etckeeper – funny coincidence – changes there will be tracked by etckeeper as well. Sounds like a self fulfilling prophecy – doesn’t it
BTW: Normally, etckeeper is run inside /etc but with the command “etckeeper init [-d directory] one can keep a clone of /etc elsewhere (read: backup).
Recent Comments