etc snapshots with git
You can track your /etc directory with git, and have apt update it automatically each time a package is installed.
install git
apt-get install git-core
initialize /etc to be a git repo
cd /etc
git init-db
chmod og-rwx .git
commit the current state
git add .
git commit -a -m"initial import"
install a snapshot script for apt to call
cat apt/git-snapshot-script
#!/bin/bash
set -e
caller=$(ps axww | grep "^ *$$" -B3 | grep " apt-get " | head -n1 | sed 's/^.*\(apt-get .*\)/\1/' )
/usr/bin/git add .
/usr/bin/git commit -a -m"snapshot after: $caller"
make it executable
chmod +x apt/git-snapshot-script
configure apt to track changes
cat apt/apt.conf
DPkg {
Post-Invoke {"cd /etc ; ./apt/git-snapshot-script";};
}
track these two files
git add .
git commit -a -m"apt will track /etc automagically using git"
… and you’re done.
Читайте також:
- vsftpd /bin/false check_shell=NO pam hack
- How To Integrate ClamAV Into PureFTPd For Virus Scanning On Debian
- Запуск декількох X сесій
- Nginx: Too Many Open Files Error
- /usr/bin/ld: cannot find -lstdc++ Debian libreadline5-dev package bug
- xen ssh login: 'stdin: is not a tty'
- Howto install and use usb modem, as example "mts connect", in debian linux
- Howto install Postfix and SASL (Debian, Ubuntu)
- debian + opera
- debian встановлення adobe flash player 10 64bit iceweasel (firefox)