summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2004-03-06 17:44:44 +0000
committerColin Watson <cjwatson@debian.org>2004-03-06 17:44:44 +0000
commit2c8ca7776552293cd249d61e4f1343bb1d17a89a (patch)
tree60b34ada7ceb20c1c76fab16353771cddce0bee8 /debian
parent3b68bdbc5f38de96fa27fcca31b62caa487ed31f (diff)
Fix up details of configuration upgrading a bit, including a warning
message.
Diffstat (limited to 'debian')
-rw-r--r--debian/postinst4
1 files changed, 3 insertions, 1 deletions
diff --git a/debian/postinst b/debian/postinst
index 5d0e32fef..0d1f3c3ed 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -60,15 +60,17 @@ create_sshdconfig() {
60 if dpkg --compare-versions "$oldversion" lt-nl 1:1.3 ; then 60 if dpkg --compare-versions "$oldversion" lt-nl 1:1.3 ; then
61 db_get ssh/new_config 61 db_get ssh/new_config
62 if [ "$RET" = "false" ] ; then return 0; fi 62 if [ "$RET" = "false" ] ; then return 0; fi
63 elif dpkg --compare-versions "$oldversion" lt-nl 1:3.7.1p2-1 && \ 63 elif dpkg --compare-versions "$oldversion" lt-nl 1:3.8p1-1 && \
64 ! grep -iq ^UsePAM /etc/ssh/sshd_config ; then 64 ! grep -iq ^UsePAM /etc/ssh/sshd_config ; then
65 # Upgrade from pre-3.7: UsePAM needed to maintain standard 65 # Upgrade from pre-3.7: UsePAM needed to maintain standard
66 # Debian configuration. 66 # Debian configuration.
67 echo -n 'Upgrading sshd_config (old version in .dpkg-old) ...'
67 cp -a /etc/ssh/sshd_config /etc/ssh/sshd_config.dpkg-old 68 cp -a /etc/ssh/sshd_config /etc/ssh/sshd_config.dpkg-old
68 perl -pe 's/^(PAMAuthenticationViaKbdInt|RhostsAuthentication)\b/#$1/i' \ 69 perl -pe 's/^(PAMAuthenticationViaKbdInt|RhostsAuthentication)\b/#$1/i' \
69 /etc/ssh/sshd_config > /etc/ssh/sshd_config.dpkg-new 70 /etc/ssh/sshd_config > /etc/ssh/sshd_config.dpkg-new
70 echo 'UsePAM yes' >> /etc/ssh/sshd_config.dpkg-new 71 echo 'UsePAM yes' >> /etc/ssh/sshd_config.dpkg-new
71 mv /etc/ssh/sshd_config.dpkg-new /etc/ssh/sshd_config 72 mv /etc/ssh/sshd_config.dpkg-new /etc/ssh/sshd_config
73 echo
72 return 0 74 return 0
73 else return 0 75 else return 0
74 fi 76 fi