summaryrefslogtreecommitdiff
path: root/debian/rsyslog.postinst
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2014-08-18 00:34:33 +0200
committerMichael Biebl <biebl@debian.org>2014-08-18 00:37:30 +0200
commit8cce420af5e064c01a56a83af0d822ae74f82a5b (patch)
tree42282492c367ec9d80b885787ea94248b4d1aaf9 /debian/rsyslog.postinst
parentd56165f8ec9a8b2b2771128d3a001fa9895b8d47 (diff)
downloadrsyslog-8cce420af5e064c01a56a83af0d822ae74f82a5b.tar.gz
Fix wheezy → jessie upgrade failure when running under systemd
During the upgrade the statically shipped symlink is replaced by one which is created in postinst by init-system-helpers. When systemd is reloaded while the symlink is missing, it loses track of the running rsyslogd process. As a workaround, create a runtime copy of the syslog.service symlink before the upgrade and remove it afterwards. See #724796
Diffstat (limited to 'debian/rsyslog.postinst')
-rw-r--r--debian/rsyslog.postinst5
1 files changed, 5 insertions, 0 deletions
diff --git a/debian/rsyslog.postinst b/debian/rsyslog.postinst
index 7bcc66f..36ffc60 100644
--- a/debian/rsyslog.postinst
+++ b/debian/rsyslog.postinst
@@ -23,6 +23,11 @@ case "$1" in
# Fix permissions of the spool/work directory (Bug: #693099)
chmod 700 /var/spool/rsyslog
+
+ # Clean up temporary syslog.service symlink
+ if [ -d /run/systemd/system ] && dpkg --compare-versions "$2" lt "7.4.1-2" ; then
+ rm -f /run/systemd/system/syslog.service
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)