Initial commit
This commit is contained in:
5
etckeeper/pre-install.d/10packagelist
Executable file
5
etckeeper/pre-install.d/10packagelist
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
# This list will be later used when committing.
|
||||
mkdir -p /var/cache/etckeeper/
|
||||
etckeeper list-installed > /var/cache/etckeeper/packagelist.pre-install
|
||||
etckeeper list-installed fmt > /var/cache/etckeeper/packagelist.fmt
|
||||
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
|
||||
3
etckeeper/pre-install.d/README
Normal file
3
etckeeper/pre-install.d/README
Normal file
@@ -0,0 +1,3 @@
|
||||
Files in this directory are run before packages are installed, upgraded,
|
||||
etc. This is mostly used for sanity checks, ie, does /etc have any
|
||||
uncommitted changes?
|
||||
Reference in New Issue
Block a user