| 1 |
#!/bin/sh |
| 2 |
# preinst script for #PACKAGE# |
| 3 |
# |
| 4 |
# see: dh_installdeb(1) |
| 5 |
|
| 6 |
set -e |
| 7 |
|
| 8 |
# summary of how this script can be called: |
| 9 |
# * <new-preinst> `install' |
| 10 |
# * <new-preinst> `install' <old-version> |
| 11 |
# * <new-preinst> `upgrade' <old-version> |
| 12 |
# * <old-preinst> `abort-upgrade' <new-version> |
| 13 |
# for details, see http://www.debian.org/doc/debian-policy/ or |
| 14 |
# the debian-policy package |
| 15 |
|
| 16 |
|
| 17 |
case "$1" in |
| 18 |
install|upgrade) |
| 19 |
# If you are upgrading from 2.6.3-2 version, kill /etc/chasenrc |
| 20 |
if [ -f /etc/chasenrc ] && [ ! -h /etc/chasenrc ] ; then |
| 21 |
# file exists and not symlink |
| 22 |
if [ `md5sum /etc/chasenrc |cut -d ' ' -f 1` = "a97fa34e4bb80d0f341b9400d3b27b76" ]; then |
| 23 |
# it was a default one, kill it. |
| 24 |
rm -f /etc/chasenrc |
| 25 |
else |
| 26 |
# it is custom one. It needs manual touch up if you insist using it. |
| 27 |
mv -f /etc/chasenrc /etc/chasenrc.keep |
| 28 |
fi |
| 29 |
fi |
| 30 |
;; |
| 31 |
|
| 32 |
abort-upgrade) |
| 33 |
;; |
| 34 |
|
| 35 |
*) |
| 36 |
echo "preinst called with unknown argument \`$1'" >&2 |
| 37 |
exit 1 |
| 38 |
;; |
| 39 |
esac |
| 40 |
|
| 41 |
# dh_installdeb will replace this with shell code automatically |
| 42 |
# generated by other debhelper scripts. |
| 43 |
|
| 44 |
#DEBHELPER# |
| 45 |
|
| 46 |
exit 0 |