From 3ddd27842dfe7f5dd40feabf19cdc2cc7950c700 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 13 Aug 2014 00:59:50 +0100 Subject: Make the if-up hook use "reload" rather than "restart" if the system was booted using systemd (closes: #756547). --- debian/changelog | 7 +++++++ debian/openssh-server.if-up | 12 +++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 92c15dda8..e041fc8d8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +openssh (1:6.6p1-8) UNRELEASED; urgency=medium + + * Make the if-up hook use "reload" rather than "restart" if the system was + booted using systemd (closes: #756547). + + -- Colin Watson Wed, 13 Aug 2014 00:59:23 +0100 + openssh (1:6.6p1-7) unstable; urgency=medium * Make sure that DEB_HOST_ARCH is set, even when invoking debian/rules diff --git a/debian/openssh-server.if-up b/debian/openssh-server.if-up index de92866e6..dd05ea51c 100644 --- a/debian/openssh-server.if-up +++ b/debian/openssh-server.if-up @@ -30,8 +30,14 @@ if [ ! -f /var/run/sshd.pid ] || \ exit 0 fi -# We'd like to use 'reload' here, but it has some problems; see -# #502444. -invoke-rc.d ssh restart >/dev/null 2>&1 || true +# We'd like to use 'reload' here, but it has some problems; see #502444. On +# the other hand, repeated restarts of ssh make systemd unhappy +# (#756547/#757822), so use reload in that case. +if [ -d /run/systemd/system ]; then + action=reload +else + action=restart +fi +invoke-rc.d ssh $action >/dev/null 2>&1 || true exit 0 -- cgit v1.2.3