#!/bin/sh # postinst 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: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure) dpkg-divert --package $PACKAGE_NAME --rename --quiet --add --divert ${SYSTEM_CONFIG_SCRIPT}.real ${SYSTEM_CONFIG_SCRIPT} ln -fs ${OUR_BINARY} ${SYSTEM_CONFIG_SCRIPT} # Divert original python locales ORIGINAL_FILE="/usr/share/ldm/rc.d/X01-localapps" NEW_FILE="/usr/share/ldm/rc.d.diversions/X01-localapps.diverted" LLIUREX_FILE="/usr/share/ldm/rc.d.diversions/X01-localapps.lliurex" dpkg-divert --package $PACKAGE_NAME --rename --quiet --add --divert $NEW_FILE $ORIGINAL_FILE cp -a "$LLIUREX_FILE" "$ORIGINAL_FILE" ORIGINAL_FILE="/usr/share/ldm/rc.d/X99-zlocalapps-cleanup" NEW_FILE="/usr/share/ldm/rc.d.diversions/X99-zlocalapps-cleanup.diverted" LLIUREX_FILE="/usr/share/ldm/rc.d.diversions/X99-zlocalapps-cleanup.lliurex" dpkg-divert --package $PACKAGE_NAME --rename --quiet --add --divert $NEW_FILE $ORIGINAL_FILE cp -a "$LLIUREX_FILE" "$ORIGINAL_FILE" ORIGINAL_FILE="/usr/share/ltsp/init-ltsp.d/05-getltsconffile" NEW_FILE="/usr/share/ltsp/init-ltsp.d.diversions/05-getltsconffile.diverted" LLIUREX_FILE="/usr/share/ltsp/init-ltsp.d.diversions/05-getltsconffile.lliurex" dpkg-divert --package $PACKAGE_NAME --rename --quiet --add --divert $NEW_FILE $ORIGINAL_FILE cp -a "$LLIUREX_FILE" "$ORIGINAL_FILE" ORIGINAL_FILE="/usr/share/ltsp/init-ltsp.d/50-rm-system-services" NEW_FILE="/usr/share/ltsp/init-ltsp.d.diversions/50-rm-system-services.diverted" LLIUREX_FILE="/usr/share/ltsp/init-ltsp.d.diversions/50-rm-system-services.lliurex" dpkg-divert --package $PACKAGE_NAME --rename --quiet --add --divert $NEW_FILE $ORIGINAL_FILE cp -a "$LLIUREX_FILE" "$ORIGINAL_FILE" ORIGINAL_FILE="/usr/share/ltsp/screen.d/ldm" NEW_FILE="/usr/share/ltsp/screen.d.diversions/ldm.diverted" LLIUREX_FILE="/usr/share/ltsp/screen.d.diversions/ldm.lliurex" dpkg-divert --package $PACKAGE_NAME --rename --quiet --add --divert $NEW_FILE $ORIGINAL_FILE cp -a "$LLIUREX_FILE" "$ORIGINAL_FILE" ORIGINAL_FILE="/usr/share/ltsp/update-kernels" NEW_FILE="/usr/share/ltsp/update-kernels.diverted" LLIUREX_FILE="/usr/share/ltsp/update-kernels.lliurex" dpkg-divert --package $PACKAGE_NAME --rename --quiet --add --divert $NEW_FILE $ORIGINAL_FILE cp -a "$LLIUREX_FILE" "$ORIGINAL_FILE" ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst 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