diff options
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/rsyslog.postinst | 5 | ||||
-rw-r--r-- | debian/rsyslog.preinst | 13 |
3 files changed, 25 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 80eeaba..77fc851 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +rsyslog (8.2.2-4) UNRELEASED; urgency=medium + + * Fix wheezy → jessie upgrade failure when running under systemd due to the + syslog.service symlink temporarily being missing. + + -- Michael Biebl <biebl@debian.org> Sun, 17 Aug 2014 18:57:06 +0200 + rsyslog (8.2.2-3) unstable; urgency=low * Upload to unstable. 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) diff --git a/debian/rsyslog.preinst b/debian/rsyslog.preinst index ae2c5f0..c15556c 100644 --- a/debian/rsyslog.preinst +++ b/debian/rsyslog.preinst @@ -10,4 +10,17 @@ if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" lt "5.7.8-1" ; then rm -f /etc/systemd/system/sockets.target.wants/rsyslog.socket fi +# In wheezy we ship the syslog.service symlink directly in the package, in +# jessie we use init-system-helpers to create it dynamically in postinst. +# During the upgrade there is a time frame when the symlink does not exist. +# If systemd is reloaded at this point, it loses track of the rsyslogd process. +# To work around this problem, create a (runtime) copy of the syslog.service +# symlink before the upgrade and remove it again afterwards. See #724796 +if [ -d /run/systemd/system ] && dpkg --compare-versions "$2" lt "7.4.1-2" ; then + target=$(readlink /etc/systemd/system/syslog.service) + if [ "$target" = /lib/systemd/system/rsyslog.service ] ; then + ln -sf "$target" /run/systemd/system/syslog.service + fi +fi + #DEBHELPER# |