preinst is in sympa 6.1.17~dfsg-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 | #!/bin/sh
#
# preinst script for sympa
#
set -e
# if /etc/sympa/data_structure.version is empty, we tried to add the right version
if [ -f /etc/sympa/data_structure.version ] && [ -z "$(egrep -v '^(#|$)' /etc/sympa/data_structure.version)" ]; then
if [ "$1" = "upgrade" ]; then
echo "$2" | sed -r 's/(~|\+|-).*$//' > /etc/sympa/data_structure.version
fi
fi
# /etc/sympa/data_structure.version should not be handled as a conffile as it
# is modified by sympa upgrade tool and it breaks the sympa upgrade process
# itsself (#655967)
# In order do manage configuration where /etc/sympa/data_structure.version was
# a conffile, we create a backup with the current version in
# /etc/sympa/data_structure.version.debian-old so that it will be possible to
# run sympa upgrade tool in postinst script with the right version
if [ -f /etc/sympa/data_structure.version ] && [ ! -f /etc/sympa/data_structure.version.debian-old ]; then
cp /etc/sympa/data_structure.version /etc/sympa/data_structure.version.debian-old
fi
if which dpkg-maintscript-helper >/dev/null && dpkg-maintscript-helper supports rm_conffile ; then
dpkg-maintscript-helper rm_conffile /etc/sympa/data_structure.version \
"6.1.11~dfsg-1~" -- "$@"
fi
# Remove conffiles used by apache2 < 2.4
if which dpkg-maintscript-helper >/dev/null && dpkg-maintscript-helper supports rm_conffile ; then
for i in apache apache-soap httpd.conf-cgi httpd.conf-fcgi ; do
dpkg-maintscript-helper rm_conffile "/etc/sympa/${i}" \
"6.1.17~dfsg-1~" -- "$@"
done
fi
exit 0
|