#!/bin/sh set -e # Template for diversions ORIG_FILE="/etc/xrdp/xrdp.ini" OUR_FILE="/usr/share/lliurex-dgti-conf-xrdp/xrdp.ini" OUR_PATH="/usr/share/lliurex-dgti-conf-xrdp/" OUR_PACKAGE="lliurex-dgti-conf-xrdp" OUR_XSESSION="/usr/share/lliurex-dgti-conf-xrdp/startwm-dgti.sh" ORIG_XSESSION="/etc/xrdp/startwm.sh" case $1 in configure) if dpkg-divert --package ${OUR_PACKAGE} --add --rename --divert ${ORIG_FILE}.real ${ORIG_FILE} ; then echo "* Diverting : ${OUR_FILE}" ln -fs ${OUR_FILE} ${ORIG_FILE} else echo "Unabe to divert file ${ORIG_FILE}" fi # Now XSESSION if dpkg-divert --package ${OUR_PACKAGE} --add --rename --divert ${ORIG_XSESSION}.real ${ORIG_XSESSION} ; then echo "* Diverting : ${OUR_XSESSION}" ln -fs ${OUR_XSESSION} ${ORIG_XSESSION} else echo "Unabe to divert file ${ORIG_XSESSION}" fi ;; *) echo "* Nothing to do" ;; esac # Other Stuff # #DEBHELPER#