summaryrefslogtreecommitdiff
path: root/pre-install.d
diff options
context:
space:
mode:
Diffstat (limited to 'pre-install.d')
-rwxr-xr-xpre-install.d/50uncommitted-changes4
1 files changed, 4 insertions, 0 deletions
diff --git a/pre-install.d/50uncommitted-changes b/pre-install.d/50uncommitted-changes
index d06883d..465b06c 100755
--- a/pre-install.d/50uncommitted-changes
+++ b/pre-install.d/50uncommitted-changes
@@ -10,6 +10,10 @@ if [ "$1" = "fail-debconf" ]; then
fi
if etckeeper unclean; then
+ if [ ! "$AVOID_COMMIT_BEFORE_INSTALL" ]; then
+ echo "error: etckeeper detected uncommitted changes in /etc prior to $HIGHLEVEL_PACKAGE_MANAGER run" >&2
+ exit 1
+ fi
if ! etckeeper commit "saving uncommitted changes in /etc prior to $HIGHLEVEL_PACKAGE_MANAGER run"; then
if [ -e /usr/share/debconf/confmodule ]; then
$0 fail-debconf