postinst is in t-prot 2.101-3.
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 42 43 44 45 46 47 48 49 50 51 52 53 54 | #!/bin/sh
# postinst for t-prot
# Copyright 2002-2010 by Gerfried Fuchs <rhonda@debian.at>
# Licenced under WTFPLv2
set -e
# Source debconf library.
if [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
fi
action=$1
version=$2
if [ "${DEBCONF_RECONFIGURE}" = "1" ]; then
# workaround until reconfigure is really available
action=reconfigure
fi
if [ "$action" != 'configure' ] && [ "$action" != 'reconfigure' ]; then
exit 0
fi
# change existing symlink from ../Muttrc.t-prot to ../t-prot/Mutrc
if [ "$version" = "2.1-1" ] && [ -L /etc/Muttrc.d/t-prot.rc ]; then
cd /etc/Muttrc.d && ln -sf ../t-prot/Muttrc t-prot.rc || true
fi
# if we got reinstalled after a remove, enable the config snippet again
if [ "$action" = 'configure' ] && [ -e /etc/Muttrc.d/t-prot.rc.removed ] && [ ! -e /etc/Muttrc.d/t-prot.rc ]; then
mv /etc/Muttrc.d/t-prot.rc.removed /etc/Muttrc.d/t-prot.rc || true
fi
# only on new install or reconfigure
if [ "x$version" = "x" ] || [ "$action" = "reconfigure" ]; then
symlink=true
if [ -e /usr/share/debconf/confmodule ]; then
db_get t-prot/muttrc.d
symlink="$RET"
fi
case "$symlink" in
true)
mkdir /etc/Muttrc.d 2> /dev/null || true
cd /etc/Muttrc.d && ln -sf ../t-prot/Muttrc t-prot.rc || true
;;
false)
if [ -L /etc/Muttrc.d/t-prot.rc ]; then
rm /etc/Muttrc.d/t-prot.rc
rmdir /etc/Muttrc.d 2> /dev/null || true
fi
;;
esac
fi
|