summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2013-05-22 17:41:59 +0100
committerColin Watson <cjwatson@debian.org>2013-05-22 17:41:59 +0100
commit46c98ffaac1a75641e3c98bd9418c2e0c9ce0696 (patch)
treeb938d0083647a3a1563bb8e218500c8531ac9715
parent549dcbef02553fc7d6b975a157871b6dae937e26 (diff)
If the running init daemon is Upstart, then, on the first upgrade to
this version, check whether sysvinit is still managing sshd; if so, manually stop it so that it can be restarted under upstart. We do this near the end of the postinst, so it shouldn't result in any appreciable extra window where sshd is not running during upgrade.
-rw-r--r--debian/changelog10
-rw-r--r--debian/openssh-server.postinst7
2 files changed, 17 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 640a8e0bb..3ad191a02 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
1openssh (1:6.2p2-3) UNRELEASED; urgency=low
2
3 * If the running init daemon is Upstart, then, on the first upgrade to
4 this version, check whether sysvinit is still managing sshd; if so,
5 manually stop it so that it can be restarted under upstart. We do this
6 near the end of the postinst, so it shouldn't result in any appreciable
7 extra window where sshd is not running during upgrade.
8
9 -- Colin Watson <cjwatson@debian.org> Wed, 22 May 2013 15:59:14 +0100
10
1openssh (1:6.2p2-2) unstable; urgency=low 11openssh (1:6.2p2-2) unstable; urgency=low
2 12
3 * Change start condition of Upstart job to be just the standard "runlevel 13 * Change start condition of Upstart job to be just the standard "runlevel
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst
index a438a4e06..087a7125e 100644
--- a/debian/openssh-server.postinst
+++ b/debian/openssh-server.postinst
@@ -279,6 +279,13 @@ if [ "$action" = configure ]; then
279 if dpkg --compare-versions "$2" lt 1:5.5p1-6; then 279 if dpkg --compare-versions "$2" lt 1:5.5p1-6; then
280 rm -f /var/run/sshd/.placeholder 280 rm -f /var/run/sshd/.placeholder
281 fi 281 fi
282 if dpkg --compare-versions "$2" lt 1:6.2p2-3 && \
283 which initctl >/dev/null && initctl version | grep -q upstart && \
284 ! status ssh 2>/dev/null | grep -q ' start/'; then
285 # We must stop the sysvinit-controlled sshd before we can
286 # restart it under Upstart.
287 start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid || true
288 fi
282fi 289fi
283 290
284#DEBHELPER# 291#DEBHELPER#