#!/bin/sh -e action="$1" oldversion="$2" umask 022 if [ "$action" != configure ] then exit 0 fi create_alternatives() { # Create alternatives for the various r* tools. # Make sure we don't change existing alternatives that a user might have # changed, but clean up after some old alternatives that mistakenly pointed # rlogin and rcp to ssh. update-alternatives --quiet --remove rlogin /usr/bin/ssh update-alternatives --quiet --remove rcp /usr/bin/ssh for cmd in rsh rlogin rcp; do scmd="s${cmd#r}" if ! update-alternatives --display "$cmd" 2>/dev/null | \ grep -q "$scmd"; then update-alternatives --quiet --install "/usr/bin/$cmd" "$cmd" "/usr/bin/$scmd" 20 \ --slave "/usr/share/man/man1/$cmd.1.gz" "$cmd.1.gz" "/usr/share/man/man1/$scmd.1.gz" fi done } set_ssh_agent_permissions() { if ! getent group ssh >/dev/null; then addgroup --system --quiet ssh fi if ! [ -x /usr/sbin/dpkg-statoverride ] || \ ! dpkg-statoverride --list /usr/bin/ssh-agent >/dev/null ; then chgrp ssh /usr/bin/ssh-agent chmod 2755 /usr/bin/ssh-agent fi } create_alternatives set_ssh_agent_permissions exit 0