preinst is in masqmail 0.3.4-1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
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 | #!/bin/sh
set -e
dpkg-maintscript-helper rm_conffile \
/etc/ppp/ip-up.d/1masqmail "0.3.4-1~" -- "$@"
dpkg-maintscript-helper rm_conffile \
/etc/ppp/ip-down.d/99masqmail "0.3.4-1~" -- "$@"
dpkg-maintscript-helper rm_conffile \
/etc/network/if-up.d/1masqmail "0.3.4-1~" -- "$@"
dpkg-maintscript-helper rm_conffile \
/etc/network/if-down.d/99masqmail "0.3.4-1~" -- "$@"
if [ "$1" = "upgrade" ] ; then
if dpkg --compare-versions "$2" lt "0.3.4-1~" ; then
# delete old-style configuration; but keep them as backup
if [ -e /etc/default/masqmail ]; then
sed -i '1,$s,^,# ,' /etc/default/masqmail || true
fi
# remove files gone out of use (obsolete) in new masqmail versions
rm -fr /var/spool/masqmail/popuidl
# rename files as they fall due in new masqmail versions
fi
fi
exit 0
|