#!/bin/bash set -e #VARS SYSTEM_CONFIG_SCRIPT="/usr/bin/update-manager" SYSTEM_AUTOSTART_SCRIPT="/usr/bin/update-notifier" OUR_AUTOSTART_BINARY="/bin/true" OUR_BINARY=/usr/sbin/lliurex-up # Template for diversions ORIG_FILE="/etc/vim/vimrc" OUR_FILE="/etc/vim/vimrc.lliurex" OUR_PACKAGE="lliurex-up" case $1 in configure) if dpkg-divert --package lliurex-up --rename --quiet --add --divert ${SYSTEM_CONFIG_SCRIPT}.real ${SYSTEM_CONFIG_SCRIPT} ; then ln -fs ${OUR_BINARY} ${SYSTEM_CONFIG_SCRIPT} else echo "Unable to divert file \"$SYSTEM_CONFIG_SCRIPT\"" >&2 fi if dpkg-divert --package lliurex-up --rename --quiet --add --divert ${SYSTEM_AUTOSTART_SCRIPT}.real ${SYSTEM_AUTOSTART_SCRIPT} ; then ln -fs ${OUR_AUTOSTART_BINARY} ${SYSTEM_AUTOSTART_SCRIPT} else echo "Unable to divert file \"$SYSTEM_AUTOSTART_SCRIPT\"" >&2 fi if dpkg-divert --package ${OUR_PACKAGE} --add --rename --divert ${ORIG_FILE}.real ${ORIG_FILE} ; then ln -fs ${OUR_FILE} ${ORIG_FILE} else echo "Unabe to divert file ${ORIG_FILE}" fi ;; esac #DEBHELPER# exit 0