diff options
author | Dominik George <natureshadow@debian.org> | 2019-02-28 19:08:30 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-02-28 19:08:30 +0000 |
commit | 3115064e04541741d558cbb7b8ecab49ea1c0af9 (patch) | |
tree | 45789a910fc77a36682094ef746dc977d71c9730 /debian/openssh-server.postinst | |
parent | 4418a1e80ce0dcc010b4a6efa9ae6056fce99f8c (diff) |
Correctly handle conffile move to openssh-server
Closes: #919344
Diffstat (limited to 'debian/openssh-server.postinst')
-rw-r--r-- | debian/openssh-server.postinst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst index ae273e9c8..552b0744e 100644 --- a/debian/openssh-server.postinst +++ b/debian/openssh-server.postinst | |||
@@ -148,6 +148,16 @@ if [ "$action" = configure ]; then | |||
148 | # restart it under systemd. | 148 | # restart it under systemd. |
149 | start-stop-daemon --stop --quiet --oknodo --pidfile /run/sshd.pid --exec /usr/sbin/sshd || true | 149 | start-stop-daemon --stop --quiet --oknodo --pidfile /run/sshd.pid --exec /usr/sbin/sshd || true |
150 | fi | 150 | fi |
151 | if dpkg --compare-versions "$2" lt-nl 1:7.9p1-5 && \ | ||
152 | [ -f /etc/ssh/moduli.dpkg-bak ]; then | ||
153 | # Handle /etc/ssh/moduli being moved from openssh-client to | ||
154 | # openssh-server. If there were no user modifications, then we | ||
155 | # don't need to do anything special here; but if there were, | ||
156 | # then the dpkg-maintscript-helper calls from openssh-client's | ||
157 | # maintainer scripts will have saved the old file as .dpkg-bak, | ||
158 | # which we now move back into place. | ||
159 | mv /etc/ssh/moduli.dpkg-bak /etc/ssh/moduli | ||
160 | fi | ||
151 | fi | 161 | fi |
152 | 162 | ||
153 | #DEBHELPER# | 163 | #DEBHELPER# |