diff options
author | Colin Watson <cjwatson@debian.org> | 2014-02-12 11:59:56 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2014-02-12 11:59:56 +0000 |
commit | 0cf4774e31e0a190a2399591a99f6a05c948f268 (patch) | |
tree | 8458c9f3984b980c2cf2a6334026e7d543b2b1db /debian | |
parent | ce51634cf72eb42a22ff1aba822080c24e8ddb91 (diff) |
Reorder transition code by guard version.
Diffstat (limited to 'debian')
-rw-r--r-- | debian/openssh-server.postinst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst index 60f88faf8..d4c1a4ddf 100644 --- a/debian/openssh-server.postinst +++ b/debian/openssh-server.postinst | |||
@@ -304,12 +304,6 @@ if [ "$action" = configure ]; then | |||
304 | # restart it under Upstart. | 304 | # restart it under Upstart. |
305 | start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid || true | 305 | start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid || true |
306 | fi | 306 | fi |
307 | if dpkg --compare-versions "$2" lt 1:6.5p1-3 && \ | ||
308 | [ -d /run/systemd/system ]; then | ||
309 | # We must stop the sysvinit-controlled sshd before we can | ||
310 | # restart it under systemd. | ||
311 | start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd || true | ||
312 | fi | ||
313 | if dpkg --compare-versions "$2" lt 1:6.5p1-2 && \ | 307 | if dpkg --compare-versions "$2" lt 1:6.5p1-2 && \ |
314 | deb-systemd-helper debian-installed ssh.socket && \ | 308 | deb-systemd-helper debian-installed ssh.socket && \ |
315 | deb-systemd-helper --quiet was-enabled ssh.service && \ | 309 | deb-systemd-helper --quiet was-enabled ssh.service && \ |
@@ -318,6 +312,12 @@ if [ "$action" = configure ]; then | |||
318 | # enabled. | 312 | # enabled. |
319 | deb-systemd-helper disable ssh.socket >/dev/null || true | 313 | deb-systemd-helper disable ssh.socket >/dev/null || true |
320 | fi | 314 | fi |
315 | if dpkg --compare-versions "$2" lt 1:6.5p1-3 && \ | ||
316 | [ -d /run/systemd/system ]; then | ||
317 | # We must stop the sysvinit-controlled sshd before we can | ||
318 | # restart it under systemd. | ||
319 | start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd || true | ||
320 | fi | ||
321 | fi | 321 | fi |
322 | 322 | ||
323 | #DEBHELPER# | 323 | #DEBHELPER# |