From 2c8ca7776552293cd249d61e4f1343bb1d17a89a Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sat, 6 Mar 2004 17:44:44 +0000 Subject: Fix up details of configuration upgrading a bit, including a warning message. --- debian/postinst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/postinst b/debian/postinst index 5d0e32fef..0d1f3c3ed 100644 --- a/debian/postinst +++ b/debian/postinst @@ -60,15 +60,17 @@ create_sshdconfig() { if dpkg --compare-versions "$oldversion" lt-nl 1:1.3 ; then db_get ssh/new_config if [ "$RET" = "false" ] ; then return 0; fi - elif dpkg --compare-versions "$oldversion" lt-nl 1:3.7.1p2-1 && \ + elif dpkg --compare-versions "$oldversion" lt-nl 1:3.8p1-1 && \ ! grep -iq ^UsePAM /etc/ssh/sshd_config ; then # Upgrade from pre-3.7: UsePAM needed to maintain standard # Debian configuration. + echo -n 'Upgrading sshd_config (old version in .dpkg-old) ...' cp -a /etc/ssh/sshd_config /etc/ssh/sshd_config.dpkg-old perl -pe 's/^(PAMAuthenticationViaKbdInt|RhostsAuthentication)\b/#$1/i' \ /etc/ssh/sshd_config > /etc/ssh/sshd_config.dpkg-new echo 'UsePAM yes' >> /etc/ssh/sshd_config.dpkg-new mv /etc/ssh/sshd_config.dpkg-new /etc/ssh/sshd_config + echo return 0 else return 0 fi -- cgit v1.2.3