summaryrefslogtreecommitdiff
path: root/pre-install.d/50uncommitted-changes
diff options
context:
space:
mode:
Diffstat (limited to 'pre-install.d/50uncommitted-changes')
-rwxr-xr-xpre-install.d/50uncommitted-changes7
1 files changed, 5 insertions, 2 deletions
diff --git a/pre-install.d/50uncommitted-changes b/pre-install.d/50uncommitted-changes
index 465b06c..47750ac 100755
--- a/pre-install.d/50uncommitted-changes
+++ b/pre-install.d/50uncommitted-changes
@@ -10,8 +10,11 @@ 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
+ if [ "$AVOID_COMMIT_BEFORE_INSTALL" = 1 ]; then
+ echo "" >&2
+ echo "** etckeeper detected uncommitted changes in /etc 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