preinst is in gpsd 3.17-5.
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 35 36 37 38 39 40 41 | #!/bin/bash
# preinst script for gpsd
#
# see: dh_installdeb(1)
set -e
case "$1" in
install|upgrade)
if dpkg --compare-versions "$2" lt '3.10-1~' ; then
# move config file
if [ -f /etc/default/gpsd ]; then
cp /etc/default/gpsd /etc/default/gpsd.dpkg-pre_3.10
gpsd_hashsum="$(md5sum /etc/default/gpsd | awk '{print $1}')"
# handle upgrades from lenny -> squeeze -> wheeze -> jessie
case ${gpsd_hashsum} in
# wheezy # squeeze # lenny # lenny -> squeeze -> wheezy
5944bab322c2a6df28cf0e64f7f7ec86|4d3f8665963201dc74721ef06bf27989|d19811464c448c0852ad541be3f7fdc3|370942c4da267af152f6c3178137e60f)
rm -f /etc/default/gpsd
;;
esac
fi
fi
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
exit 0
|