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.
Читайте також:
- debian встановлення adobe flash player 10 64bit iceweasel (firefox)
- Запуск декількох X сесій
- Конвертуємо та нарізаємо flac ape файли
- Коротко про керування пакетами в Debian
- xen ssh login: 'stdin: is not a tty'
- Howto install and use usb modem, as example "mts connect", in debian linux
- Nginx: Too Many Open Files Error
- Веб-камера Ricoh VGP-VCC5 в linux
- vsftpd /bin/false check_shell=NO pam hack
- How To capture video from tv-tuner card via mencoder