Initial commit.
This commit is contained in:
15
etckeeper/pre-install.d/50uncommitted-changes
Executable file
15
etckeeper/pre-install.d/50uncommitted-changes
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
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 "** 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
|
||||
echo "warning: etckeeper failed to commit changes in /etc using $VCS" >&2
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user