#!/bin/sh set -e # Template for diversions ORIG_FILE="/etc/ssh/sshd_config" OUR_FILE="/etc/ssh/sshd_config.dgti" OUR_PACKAGE="lliurex-dgti-conf-sshd" case $1 in configure) ORIG_FILE="/etc/ssh/sshd_config" OUR_FILE="/etc/ssh/sshd_config.dgti" OUR_PACKAGE="lliurex-dgti-conf-sshd" rc=0 dpkg-divert --list | grep -q "/etc/ssh/sshd_config.real" || rc=1 if [ "$rc" = "0" ] ; then if [ -L /etc/ssh/sshd_config ]; then REALLINK=$(readlink -f /etc/ssh/sshd_config) if [ "$REALLINK" = "/etc/ssh/sshd_config.dgti" ]; then rm /etc/ssh/sshd_config || true fi fi dpkg-divert --package ${OUR_PACKAGE} --rename --quiet --remove ${ORIG_FILE}|| true fi ;; *) echo "Nothing to do" ;; esac # Other Stuff # #DEBHELPER#