#!/bin/sh # prerm script for lmd-client # # see: dh_installdeb(1) set -e SYSTEM_CONFIG_SCRIPT="/etc/ltsp/update-kernels.conf" OUR_BINARY="/etc/ltsp/update-kernels.conf.lliurex" PACKAGE_NAME="lmd-client" # summary of how this script can be called: # * `remove' # * `upgrade' # * `failed-upgrade' # * `remove' `in-favour' # * `deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in remove|upgrade|deconfigure) if [ -f "${SYSTEM_CONFIG_SCRIPT}.real" ] ; then rm -f "${SYSTEM_CONFIG_SCRIPT}" dpkg-divert --package $PACKAGE_NAME --rename --quiet --remove "${SYSTEM_CONFIG_SCRIPT}" || true fi # Divert original python locales ORIGINAL_FILE="/usr/share/ldm/rc.d/X01-localapps" rm -f "$ORIGINAL_FILE" dpkg-divert --package $PACKAGE_NAME --rename --quiet --remove $ORIGINAL_FILE || true ORIGINAL_FILE="/usr/share/ldm/rc.d/X99-zlocalapps-cleanup" rm -f "$ORIGINAL_FILE" dpkg-divert --package $PACKAGE_NAME --rename --quiet --remove $ORIGINAL_FILE || true ORIGINAL_FILE="/usr/share/ltsp/init-ltsp.d/05-getltsconffile" rm -f "$ORIGINAL_FILE" dpkg-divert --package $PACKAGE_NAME --rename --quiet --remove $ORIGINAL_FILE || true ORIGINAL_FILE="/usr/share/ltsp/init-ltsp.d/50-rm-system-services" rm -f "$ORIGINAL_FILE" dpkg-divert --package $PACKAGE_NAME --rename --quiet --remove $ORIGINAL_FILE || true ORIGINAL_FILE="/usr/share/ltsp/screen.d/ldm" rm -f "$ORIGINAL_FILE" dpkg-divert --package $PACKAGE_NAME --rename --quiet --remove $ORIGINAL_FILE || true ;; failed-upgrade) ;; *) echo "prerm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0