From de5cb3521702a593b1abab37a9d54e93a80c40e7 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 12 Feb 2014 11:58:09 +0000 Subject: Fix sysvinit->systemd transition code We need to cope with still-running sysvinit jobs being considered active by systemd (thanks, Uoti Urpala and Michael Biebl). --- debian/changelog | 3 +++ debian/openssh-server.postinst | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c908bc162..6bf502848 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,9 @@ openssh (1:6.5p1-3) UNRELEASED; urgency=medium * Stop claiming that "Protocol 2" is a Debian-specific default; this has been upstream's default since 5.4p1. * Avoid stdout noise from which(1) on purge of openssh-client. + * Fix sysvinit->systemd transition code to cope with still-running + sysvinit jobs being considered active by systemd (thanks, Uoti Urpala + and Michael Biebl). -- Colin Watson Tue, 11 Feb 2014 21:36:14 +0000 diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst index 72200604e..5f5787698 100644 --- a/debian/openssh-server.postinst +++ b/debian/openssh-server.postinst @@ -305,11 +305,10 @@ if [ "$action" = configure ]; then start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid || true fi if dpkg --compare-versions "$2" lt 1:6.5p1-1 && \ - [ -d /run/systemd/system ] && \ - ! systemctl --quiet is-active ssh; then + [ -d /run/systemd/system ]; then # We must stop the sysvinit-controlled sshd before we can # restart it under systemd. - start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid || true + start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd || true fi if dpkg --compare-versions "$2" lt 1:6.5p1-2 && \ deb-systemd-helper debian-installed ssh.socket && \ -- cgit v1.2.3