2
# preinst script for isdnutils-xtools
3
# It's needed because the X app-defaults is now a conffile, and I want to
4
# prevent unnecessary dpkg questions to the user.
5
# If the MD5SUM of the existing file isn't what's expected, then the file
6
# has been changed by the user, so we rename it now, and in the postinst
7
# move it back. This can be done as this file hasn't changed in the debian
9
# Do this only when the old version is less than 1:3.1pre1b-29
13
# summary of how this script can be called:
14
# * <new-preinst> `install'
15
# * <new-preinst> `install' <old-version>
16
# * <new-preinst> `upgrade' <old-version>
17
# * <old-preinst> `abort-upgrade' <new-version>
24
if dpkg --compare-versions "$OLDVERSION" lt "1:3.1pre1b-30"; then
25
if [ -s /etc/X11/app-defaults/XISDNLoad ]; then
26
if ! [ `md5sum < /etc/X11/app-defaults/XISDNLoad` = 0a2c032c71ff2d8fa2f78ced21f5a16f ]; then
29
rm -f /etc/X11/app-defaults/XISDNLoad.dpkg-old
30
mv -f /etc/X11/app-defaults/XISDNLoad /etc/X11/app-defaults/XISDNLoad.dpkg-old
40
echo "preinst called with unknown argument \`$DOWHAT'" >&2
45
# dh_installdeb will replace this with shell code automatically
46
# generated by other debhelper scripts.