[pkg-bacula-commits] [bacula] 01/02: Remove leftover /etc/tmpfiles.d/bacula.conf if identical to new
Sven Hartge
hartge-guest at moszumanska.debian.org
Mon Jul 18 14:08:59 UTC 2016
This is an automated email from the git hooks/post-receive script.
hartge-guest pushed a commit to branch master-systemd
in repository bacula.
commit c254b1ecbc9709bdb7324e263e234835d00fe868
Author: Sven Hartge <sven at svenhartge.de>
Date: Mon Jul 18 16:03:42 2016 +0200
Remove leftover /etc/tmpfiles.d/bacula.conf if identical to new
In some earlier versions of the package bacula-common a tmpfiles
config-file was shipped as /etc/tmpfiles.d/bacula.conf. This config-
file disappeared from the upstream source and has been readded later,
this time in the correct directory for tmpfiles-config-files from
packages in /usr/lib/tmpfiles.d/bacula.conf.
But the old config-file could be left over and could cause problems
or irritations. We compare the old file to the new one and delete the
old one if it has not been altered by the admin. If this is the case
we just warn about this and keep going.
---
debian/bacula-common.postinst | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/debian/bacula-common.postinst b/debian/bacula-common.postinst
index c245ede..342affb 100644
--- a/debian/bacula-common.postinst
+++ b/debian/bacula-common.postinst
@@ -15,6 +15,17 @@ case "$1" in
. /usr/share/bacula-common/common-functions.dpkg
readOrCreatePasswords # create our common passwords if needed
+
+ # Remove leftover /etc/tmpfiles.d/bacula.conf if it is identical
+ # to /usr/lib/tmpfiles.d/bacula.conf
+ if [ -f /etc/tmpfiles.d/bacula.conf ]; then
+ if diff /etc/tmpfiles.d/bacula.conf /usr/lib/tmpfiles.d/bacula.conf >/dev/null; then
+ rm /etc/tmpfiles.d/bacula.conf
+ else
+ echo "/etc/tmpfiles.d/bacula.conf and /usr/lib/tmpfiles.d/bacula.conf differ, please check contents manually" >&2
+ fi
+ fi
+
;;
esac
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bacula/bacula.git
More information about the pkg-bacula-commits
mailing list