From fa8ece261cc20f71a7230259b6c6923b37187167 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sun, 19 Apr 2015 08:08:11 -0500 Subject: 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. --- debian/changelog | 10 ++++++++++ debian/openssh-server.postinst | 12 ++++++------ 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 @@ +openssh (1:6.7p1-6) UNRELEASED; urgency=medium + + * 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. + + -- Martin Pitt Thu, 09 Apr 2015 09:20:36 +0200 + openssh (1:6.7p1-5) unstable; urgency=medium * 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 fix_statoverride setup_sshd_user # Renamed to /etc/ssh/moduli in 2.9.9 (!) - if dpkg --compare-versions "$2" lt 1:4.7p1-1; then + if dpkg --compare-versions "$2" lt-nl 1:4.7p1-1; then rm -f /etc/ssh/primes fi - if dpkg --compare-versions "$2" lt 1:5.5p1-6; then + if dpkg --compare-versions "$2" lt-nl 1:5.5p1-6; then rm -f /var/run/sshd/.placeholder fi - if dpkg --compare-versions "$2" lt 1:6.2p2-3 && \ - which initctl >/dev/null && initctl version | grep -q upstart && \ + if dpkg --compare-versions "$2" lt-nl 1:6.2p2-3 && \ + which initctl >/dev/null && initctl version 2>/dev/null | grep -q upstart && \ ! status ssh 2>/dev/null | grep -q ' start/'; then # We must stop the sysvinit-controlled sshd before we can # 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-2 && \ + if dpkg --compare-versions "$2" lt-nl 1:6.5p1-2 && \ deb-systemd-helper debian-installed ssh.socket && \ deb-systemd-helper --quiet was-enabled ssh.service && \ deb-systemd-helper --quiet was-enabled ssh.socket; then @@ -303,7 +303,7 @@ 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 && \ + if dpkg --compare-versions "$2" lt-nl 1:6.5p1-3 && \ [ -d /run/systemd/system ]; then # We must stop the sysvinit-controlled sshd before we can # restart it under systemd. -- cgit v1.2.3