~ubuntu-branches/ubuntu/precise/exim4/precise

« back to all changes in this revision

Viewing changes to debian/exim4-config.preinst

  • Committer: Bazaar Package Importer
  • Author(s): Marc Haber
  • Date: 2007-10-07 21:38:22 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20071007213822-qh6kpp40r2o2c3zf
Tags: 4.68-1
* new upstream version. Closes: #444195
  * Documents tls_verify_hosts during TLS sessions. Closes: #422419
  * new example.conf md5 sum
* Move lowuid router to a later place, handle real- only for
  locally generated messages. Thanks to Andreas Metzler and others
  on pkg-exim4-devel. Closes: #420217
* /etc/init.d/exim4:
  * Use start_daemon and killproc from lsb-base
    as a new plunge at #396944
  * Do not clean the environment as severly as before (functions
    need to survive).
* README.Debian:
  * Document that using client certificates needs extra
    configuration. Thanks to John Goerzen. Closes: #440663
* conf.d/main/03_exim4-config_tlsoptions: Make it clear that this
  file only concerns exim as an SMTP server.
* exim4-config.preinst: Add EX4DEBUG facility, add rm_conffile
  function
* Rename acl_whitelist_local_deny to acl_local_deny_exceptions
  as suggested by Ross Boylan. Closes: #387078.
* Switch Build-Depends to db4.6. Closes: #442645
* Debconf translations updates:
  - Portuguese. Thanks to Miguel Figueiredo. Closes: #441895, #445494
  - Norwegian Nynorsk. Thanks to Håvard Korsvoll.
* exim4-config.NEWS: Explicitly mention that .dpkg-old and
  .dpkg-dist files are included in the DEBCONFsomethingDEBCONF check to
  allow lazy people to only grep the docs instead of actually reading
  them. This was requested by Hamish Moffatt in #445327.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
 
 
3
if [ -n "$EX4DEBUG" ]; then
 
4
  echo "now debugging $0 $@"
 
5
  set -x
 
6
fi
 
7
 
 
8
# Remove a no-longer used conffile
 
9
# Solution and code taken from http://wiki.debian.org/DpkgConffileHandling
 
10
# and "beautified" (hopefully not broken)
 
11
rm_conffile() {
 
12
    PKGNAME="$1"
 
13
    CONFFILE="$2"
 
14
 
 
15
    if [ -e "$CONFFILE" ]; then
 
16
        md5sum="$(md5sum "$CONFFILE" | sed -e "s/ .*//")"
 
17
        old_md5sum="$(dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e "\' $CONFFILE'{s/ obsolete$//;s/.* //;p;}")"
 
18
        if [ "$md5sum" != "$old_md5sum" ]; then
 
19
            echo "Obsolete conffile $CONFFILE has been modified by you."
 
20
            echo "Saving as $CONFFILE.dpkg-bak ..."
 
21
            mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
 
22
        else
 
23
            echo "Removing obsolete conffile $CONFFILE ..."
 
24
            rm -f "$CONFFILE"
 
25
        fi
 
26
    fi
 
27
}
 
28
 
 
29
case "$1" in
 
30
install|upgrade)
 
31
    if dpkg --compare-versions "$2" lt "4.68-1"; then
 
32
       rm_conffile exim4-config "/etc/exim4/conf.d/acl/20_exim4-config_whitelist_local_deny"
 
33
       rm_conffile exim4-config "/etc/exim4/conf.d/router/250_exim4-config_lowuid"
 
34
    fi
 
35
esac
 
36
 
 
37
#DEBHELPER#