From 0cf4774e31e0a190a2399591a99f6a05c948f268 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 12 Feb 2014 11:59:56 +0000 Subject: Reorder transition code by guard version. --- debian/openssh-server.postinst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'debian') 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 # restart it under Upstart. start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid || true fi - if dpkg --compare-versions "$2" lt 1:6.5p1-3 && \ - [ -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 --exec /usr/sbin/sshd || true - fi if dpkg --compare-versions "$2" lt 1:6.5p1-2 && \ deb-systemd-helper debian-installed ssh.socket && \ deb-systemd-helper --quiet was-enabled ssh.service && \ @@ -318,6 +312,12 @@ if [ "$action" = configure ]; then # enabled. deb-systemd-helper disable ssh.socket >/dev/null || true fi + if dpkg --compare-versions "$2" lt 1:6.5p1-3 && \ + [ -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 --exec /usr/sbin/sshd || true + fi fi #DEBHELPER# -- cgit v1.2.3