~ubuntu-branches/ubuntu/saucy/horde3/saucy

« back to all changes in this revision

Viewing changes to debian/horde3.preinst

  • Committer: Bazaar Package Importer
  • Author(s): Gregory Colpart
  • Date: 2008-09-22 03:28:05 UTC
  • mfrom: (1.1.8 upstream) (8.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080922032805-79iobt5nt5101bf6
Tags: 3.2.2+debian0-1
* New upstream release.
* This version is mainly for fixing two security bugs: unescaped output in
  the MIME library and improve the XSS filter for HTML (See CVE-2008-3823 for
  more information). (Closes: #499579)
* Add changelog entry with CVE ID in changelog for 3.2.1+debian0-1.
* Fix misspelling in Recommends: field. (Closes: #499001)
* Improve upgrade path Etch->Lenny with forcing to show diff of
  /etc/horde/horde3/registry.php because all horde components are now
  inactive by default. (Closes: #493885)
* Change Gregory Colpart's email address in debian/control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# preinst script for horde3
 
3
 
 
4
set -e
 
5
 
 
6
case "$1" in
 
7
    install|upgrade)
 
8
 
 
9
    CONFFILE=/etc/horde/horde3/registry.php
 
10
 
 
11
    if dpkg --compare-versions "$2" lt "3.2.1+debian0-2"; then
 
12
        if [ -e "$CONFFILE" ]; then
 
13
            md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
 
14
            old_md5sum="`dpkg-query -W -f='${Conffiles}' horde3 | sed -n -e \"\\\\' $CONFFILE '{s/ obsolete$//;s/.* //p}\"`"
 
15
            if [ "$md5sum" = "$old_md5sum" ]; then
 
16
                echo >> "$CONFFILE"
 
17
            fi
 
18
        fi
 
19
    fi
 
20
 
 
21
    ;;
 
22
 
 
23
    abort-upgrade)
 
24
    ;;
 
25
 
 
26
    *)
 
27
        echo "postinst called with unknown argument \`$1'" >&2
 
28
        exit 1
 
29
    ;;
 
30
esac
 
31
 
 
32
#DEBHELPER#
 
33
 
 
34
exit 0