postinst is in im 1:151-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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | #! /bin/sh
set -e
. /usr/share/debconf/confmodule
db_get im/rpop
if [ "$RET" = "true" ]; then
if [ ! -x /usr/bin/suidperl ] ; then
echo "The file /usr/bin/suidperl is not found."
echo "You should install the perl-suid package for imget with RPOP."
db_purge
exit 255
else
if dpkg-statoverride --list /usr/bin/imget >/dev/null ; then
dpkg-statoverride --remove /usr/bin/imget
fi
dpkg-statoverride --update --add root root 4755 /usr/bin/imget
fi
else
if dpkg-statoverride --list /usr/bin/imget >/dev/null ; then
dpkg-statoverride --remove /usr/bin/imget
fi
chmod 0755 /usr/bin/imget
fi
db_get im/siteconfig_by_hand
if [ "$RET" = "false" ]; then
db_get im/fromdomain
FROM_DOMAIN="$RET"
db_get im/todomain
TO_DOMAIN="$RET"
db_get im/organization
ORGANIZATION="$RET"
db_get im/use_maildir
if [ "$RET" = "true" ]; then
MBOXSTYLE="qmail"
else
MBOXSTYLE=""
fi
TMPCONFIG=/etc/im/SiteConig.postinst-tmp
cat <<POSTINST_EOF_OF_IM > $TMPCONFIG
FromDomain=$FROM_DOMAIN # domain of your mail address
ToDomain=$TO_DOMAIN # domain when domain part is omitted
Org=$ORGANIZATION # for news posting
MBoxStyle=$MBOXSTYLE # qmail or not
POSTINST_EOF_OF_IM
if [ -f /etc/im/SiteConfig ]; then
if cmp -s /etc/im/SiteConfig $TMPCONFIG ; then
rm -f $TMPCONFIG
else
savelog /etc/im/SiteConfig
rm -f /etc/im/SiteConfig
mv $TMPCONFIG /etc/im/SiteConfig
fi
else
mv $TMPCONFIG /etc/im/SiteConfig
fi
fi
|