summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2015-04-19 08:08:11 -0500
committerColin Watson <cjwatson@debian.org>2015-04-19 08:08:11 -0500
commitfa8ece261cc20f71a7230259b6c6923b37187167 (patch)
tree413f3b32702a5b1798e42b534694fe441c3dcd84
parentc77724ca2355dec905cfa1e18930c79e32db2d4e (diff)
Silence confusing messages if Upstart is installed but not active
* openssh-server.postinst: Quiesce "Unable to connect to Upstart" error message from initctl if upstart is installed, but not the current init system. (LP: #1440070) * openssh-server.postinst: Fix version comparisons of upgrade adjustments to not apply to fresh installs.
-rw-r--r--debian/changelog10
-rw-r--r--debian/openssh-server.postinst12
2 files changed, 16 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog
index 02dc9be98..d15fe4934 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
1openssh (1:6.7p1-6) UNRELEASED; urgency=medium
2
3 * openssh-server.postinst: Quiesce "Unable to connect to Upstart" error
4 message from initctl if upstart is installed, but not the current init
5 system. (LP: #1440070)
6 * openssh-server.postinst: Fix version comparisons of upgrade adjustments
7 to not apply to fresh installs.
8
9 -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 09 Apr 2015 09:20:36 +0200
10
1openssh (1:6.7p1-5) unstable; urgency=medium 11openssh (1:6.7p1-5) unstable; urgency=medium
2 12
3 * Revert change from previous upload, which causes far more trouble than 13 * Revert change from previous upload, which causes far more trouble than
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst
index 5131b2647..9e8516ca7 100644
--- a/debian/openssh-server.postinst
+++ b/debian/openssh-server.postinst
@@ -282,20 +282,20 @@ if [ "$action" = configure ]; then
282 fix_statoverride 282 fix_statoverride
283 setup_sshd_user 283 setup_sshd_user
284 # Renamed to /etc/ssh/moduli in 2.9.9 (!) 284 # Renamed to /etc/ssh/moduli in 2.9.9 (!)
285 if dpkg --compare-versions "$2" lt 1:4.7p1-1; then 285 if dpkg --compare-versions "$2" lt-nl 1:4.7p1-1; then
286 rm -f /etc/ssh/primes 286 rm -f /etc/ssh/primes
287 fi 287 fi
288 if dpkg --compare-versions "$2" lt 1:5.5p1-6; then 288 if dpkg --compare-versions "$2" lt-nl 1:5.5p1-6; then
289 rm -f /var/run/sshd/.placeholder 289 rm -f /var/run/sshd/.placeholder
290 fi 290 fi
291 if dpkg --compare-versions "$2" lt 1:6.2p2-3 && \ 291 if dpkg --compare-versions "$2" lt-nl 1:6.2p2-3 && \
292 which initctl >/dev/null && initctl version | grep -q upstart && \ 292 which initctl >/dev/null && initctl version 2>/dev/null | grep -q upstart && \
293 ! status ssh 2>/dev/null | grep -q ' start/'; then 293 ! status ssh 2>/dev/null | grep -q ' start/'; then
294 # We must stop the sysvinit-controlled sshd before we can 294 # We must stop the sysvinit-controlled sshd before we can
295 # restart it under Upstart. 295 # restart it under Upstart.
296 start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid || true 296 start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid || true
297 fi 297 fi
298 if dpkg --compare-versions "$2" lt 1:6.5p1-2 && \ 298 if dpkg --compare-versions "$2" lt-nl 1:6.5p1-2 && \
299 deb-systemd-helper debian-installed ssh.socket && \ 299 deb-systemd-helper debian-installed ssh.socket && \
300 deb-systemd-helper --quiet was-enabled ssh.service && \ 300 deb-systemd-helper --quiet was-enabled ssh.service && \
301 deb-systemd-helper --quiet was-enabled ssh.socket; then 301 deb-systemd-helper --quiet was-enabled ssh.socket; then
@@ -303,7 +303,7 @@ if [ "$action" = configure ]; then
303 # enabled. 303 # enabled.
304 deb-systemd-helper disable ssh.socket >/dev/null || true 304 deb-systemd-helper disable ssh.socket >/dev/null || true
305 fi 305 fi
306 if dpkg --compare-versions "$2" lt 1:6.5p1-3 && \ 306 if dpkg --compare-versions "$2" lt-nl 1:6.5p1-3 && \
307 [ -d /run/systemd/system ]; then 307 [ -d /run/systemd/system ]; then
308 # We must stop the sysvinit-controlled sshd before we can 308 # We must stop the sysvinit-controlled sshd before we can
309 # restart it under systemd. 309 # restart it under systemd.