postinst is in dma 0.11-1build1.
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 64 65 66 | #!/bin/sh
# postinst script for dma
set -e
# lkajan: resolution of #688682
dpkg-maintscript-helper rm_conffile /etc/dma/dma.conf "0.0.2010.06.17-14.1~" dma -- "$@"
. /usr/share/debconf/confmodule
db_version 2.0
umask 022
case "$1" in
configure)
db_get dma/mailname
echo "$RET" > /etc/mailname
# lkajan: example is apticron
tmpfile="$( mktemp -t dma.conf.XXXXXXXXXX )"
chown root:mail "$tmpfile"; chmod 0640 "$tmpfile"
# lkajan: preserve changes to old conffile dma.conf (dma.conf.dpkg-backup at this point), if any:
if [ -e /etc/dma/dma.conf.dpkg-backup ]; then
cp -f /etc/dma/dma.conf.dpkg-backup "$tmpfile";
else
cp -f /usr/share/dma/dma.conf "$tmpfile";
fi
db_get dma/relayhost
if [ -n "$RET" ]; then
sed -i -re 's@^[[:space:]]*(#+[[:space:]]*)?SMARTHOST([[:space:]]+.*)?$@SMARTHOST '"$RET@" "$tmpfile"
else
sed -i -re 's@^[[:space:]]*(#+[[:space:]]*)?SMARTHOST([[:space:]]+.*)?$@#SMARTHOST@' "$tmpfile"
fi
ucf --debconf-ok --three-way "$tmpfile" /etc/dma/dma.conf
rm -f "$tmpfile"
ucfr dma /etc/dma/dma.conf
if dpkg --compare-versions "$2" lt '0.0.2009.07.17-3'; then
chown root:mail /etc/dma/*
chmod 640 /etc/dma/*
fi
if dpkg --compare-versions "$2" lt-nl '0.10-1~'; then
chmod 0660 /var/spool/dma/flush > /dev/null 2>&1 || true
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
# Automatically added by dh_installdeb/11.1.4ubuntu1
dpkg-maintscript-helper rm_conffile /etc/dma/virtusertable 0.9-1~ -- "$@"
# End automatically added section
exit 0
|