#!/bin/sh set -e action="$1" oldversion="$2" if [ "$action" = configure ] ; then if dpkg --compare-versions "$oldversion" lt-nl 1:4.3p2-7; then # Replaced by /etc/init.d/ssh. if [ -f /etc/init.d/ssh-krb5 ]; then mv /etc/init.d/ssh-krb5 /etc/init.d/ssh-krb5.dpkg-old update-rc.d ssh-krb5 remove || true fi fi if dpkg --compare-versions "$oldversion" ge 1:4.3p2-7 || \ grep -qi '^[ ]*GSSAPI' /etc/ssh/sshd_config ; then : else if grep -qi '^#GSSAPI' /etc/ssh/sshd_config ; then perl -pe 's/^\#(GSSAPI(Authentication|KeyExchange))\b/$1/i' \ < /etc/ssh/sshd_config > /etc/ssh/sshd_config.dpkg-new chown --reference /etc/ssh/sshd_config \ /etc/ssh/sshd_config.dpkg-new chmod --reference /etc/ssh/sshd_config \ /etc/ssh/sshd_config.dpkg-new mv /etc/ssh/sshd_config.dpkg-new /etc/ssh/sshd_config else cat >> /etc/ssh/sshd_config <