c4422bff9c
etckeeper is a collection of tools to let /etc be stored in a git, mercurial, darcs, or bzr repository. It hooks into apt (and other package managers including yum and pacman-g2) to automatically commit changes made to /etc during package upgrades. It tracks file metadata that revison control systems do not normally support, but that is important for /etc, such as the permissions of /etc/shadow. It's quite modular and configurable, while also being simple to use if you understand the basics of working with revision control.
26 lines
1.2 KiB
Text
26 lines
1.2 KiB
Text
$NetBSD: patch-pre-install.d_50uncommitted-changes,v 1.1 2013/05/27 08:36:00 sbd Exp $
|
|
|
|
Change '/etc' to ${ETCKEEPER_DIR}.
|
|
|
|
--- pre-install.d/50uncommitted-changes.orig 2011-02-22 20:19:36.000000000 +0000
|
|
+++ pre-install.d/50uncommitted-changes
|
|
@@ -13,16 +13,16 @@ fi
|
|
if etckeeper unclean; then
|
|
if [ "$AVOID_COMMIT_BEFORE_INSTALL" = 1 ]; then
|
|
echo "" >&2
|
|
- echo "** etckeeper detected uncommitted changes in /etc prior to $HIGHLEVEL_PACKAGE_MANAGER run" >&2
|
|
+ echo "** etckeeper detected uncommitted changes in ${ETCKEEPER_DIR} prior to $HIGHLEVEL_PACKAGE_MANAGER run" >&2
|
|
echo "** Aborting $HIGHLEVEL_PACKAGE_MANAGER run. Manually commit and restart." >&2
|
|
echo "" >&2
|
|
exit 1
|
|
fi
|
|
- if ! etckeeper commit "saving uncommitted changes in /etc prior to $HIGHLEVEL_PACKAGE_MANAGER run"; then
|
|
+ if ! etckeeper commit "saving uncommitted changes in ${ETCKEEPER_DIR} prior to $HIGHLEVEL_PACKAGE_MANAGER run"; then
|
|
if [ -e /usr/share/debconf/confmodule ]; then
|
|
$0 fail-debconf
|
|
else
|
|
- echo "error: etckeeper failed to commit changes in /etc using $VCS"
|
|
+ echo "error: etckeeper failed to commit changes in ${ETCKEEPER_DIR} using $VCS"
|
|
exit 1
|
|
fi
|
|
fi
|