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.
Читайте також:
- Nginx: Too Many Open Files Error
- vsftpd /bin/false check_shell=NO pam hack
- debian + opera
- Коротко про керування пакетами в Debian
- Конвертуємо та нарізаємо flac ape файли
- Howto install and use usb modem, as example "mts connect", in debian linux
- Запуск декількох X сесій
- screen в chroot debian linux
- Веб-камера Ricoh VGP-VCC5 в linux
- Howto install Postfix and SASL (Debian, Ubuntu)