preinst is in qmail 1.06-6.
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 | #!/bin/sh
set -e
errcho() {
echo "$*" >&2
}
if test "$1" = upgrade && dpkg --compare-versions "$2" lt 1.06; then
case "$2" in
*zarge*)
if test -x /usr/lib/qmail/prepare-upgrade-from-unofficial; then
/usr/lib/qmail/prepare-upgrade-from-unofficial
else
errcho "Upgrading from qmail version $2 is not yet supported."
exit 1
fi
;;
*)
if test -x /usr/lib/qmail/prepare-upgrade-from-nonfree; then
/var/usr/qmail/prepare-upgrade-from-nonfree
else
errcho "Upgrading from qmail version $2 is not yet supported."
exit 1
fi
;;
esac
fi
|