1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
#!/bin/sh
set -e
# Summary of how this script can be called:
# * <new-preinst> 'install'
# * <new-preinst> 'install' <old-version>
# * <new-preinst> 'upgrade' <old-version>
# * <old-preinst> 'abort-upgrade' <new-version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package.
case "$1" in
install|upgrade)
# Revert previous symlink and use unpacked .conf
if dpkg --compare-versions "$2" le 13-3; then
if [ -h /etc/X11/xorg.conf.d/50-digimend.conf ]; then
if [ $(readlink /etc/X11/xorg.conf.d/50-digimend.conf) = "/usr/share/X11/xorg.conf.d/50-digimend.conf" ]; then
echo "Remove deprecated symlink: /etc/X11/xorg.conf.d/50-digimend.conf"
rm -f /etc/X11/xorg.conf.d/50-digimend.conf
fi
fi
fi
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument '$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0
|