summaryrefslogtreecommitdiff
path: root/post-install.d/50vcs-commit
diff options
context:
space:
mode:
Diffstat (limited to 'post-install.d/50vcs-commit')
-rwxr-xr-xpost-install.d/50vcs-commit16
1 files changed, 8 insertions, 8 deletions
diff --git a/post-install.d/50vcs-commit b/post-install.d/50vcs-commit
index 6cb6bd1..7710c4a 100755
--- a/post-install.d/50vcs-commit
+++ b/post-install.d/50vcs-commit
@@ -2,20 +2,20 @@
set -e
pl="/var/cache/etckeeper/packagelist"
-NL="
-"
if etckeeper unclean; then
message="committing changes in /etc after $HIGHLEVEL_PACKAGE_MANAGER run"
if [ -e $pl.pre-install ]; then
- diff="$(etckeeper list-installed | diff -U0 $pl.pre-install - | tail -n+4 | egrep '^[-+]')" || true
- if [ -n "$diff" ]; then
- message="$message$NL${NL}Package changes:$NL$diff"
- fi
+ (
+ echo "$message"
+ echo
+ echo "Package changes:"
+ etckeeper list-installed | diff -U0 $pl.pre-install - | tail -n+4 | egrep '^[-+]' || true
+ ) | etckeeper commit --stdin
+ else
+ etckeeper commit "$(printf "$message")"
fi
-
- etckeeper commit "$(printf "$message")"
fi
if [ -e $pl.pre-install ]; then