~ubuntu-branches/ubuntu/trusty/sendmail/trusty

« back to all changes in this revision

Viewing changes to debian/sensible-mda.preinst

  • Committer: Bazaar Package Importer
  • Author(s): Richard A Nelson (Rick)
  • Date: 2009-03-01 18:45:00 UTC
  • mfrom: (8.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090301184500-z6683zxyomgmop6c
Tags: 8.14.3-9
Batting 1000, build-depend on quilt      Closes: #517676

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
#
 
3
# Debian pre install script
 
4
#
 
5
# Install of already installed package:
 
6
#       1) Upgrade of package:
 
7
#               new-preinst upgrade old-version
 
8
#               *) new-postrm abort-upgrade old-version
 
9
#       2) package had some configuration files from a previous version installed
 
10
#               new-preinst install old-version
 
11
#               *) new-postrm abort-install old-version
 
12
#       3) Otherwise (i.e., the package was completely purged)
 
13
#               new-preinst install
 
14
#               *) new-postrm abort-install
 
15
#
 
16
set -e;
 
17
 
 
18
PACKAGE=sensible-mda;
 
19
 
 
20
case "$1" in
 
21
        install)
 
22
                # DPKG doesn't overwrite directories with symlinks...
 
23
                if [ -d /usr/share/doc/$PACKAGE ]; then
 
24
                        rm -rf /usr/share/doc/$PACKAGE;
 
25
                        fi;
 
26
                if [ ! -d /usr/share/doc/sendmail ]; then
 
27
                        mkdir -p /usr/share/doc/sendmail;
 
28
                        chmod a+rx /usr/share/doc/sendmail;
 
29
                        fi;
 
30
                ln -sf sendmail /usr/share/doc/$PACKAGE;
 
31
                ;;
 
32
 
 
33
        upgrade)
 
34
                # DPKG doesn't overwrite directories with symlinks...
 
35
                if [ -d /usr/share/doc/$PACKAGE ]; then
 
36
                        rm -rf /usr/share/doc/$PACKAGE;
 
37
                        fi;
 
38
                if [ ! -d /usr/share/doc/sendmail ]; then
 
39
                        mkdir -p /usr/share/doc/sendmail;
 
40
                        chmod a+rx /usr/share/doc/sendmail;
 
41
                        fi;
 
42
                ln -sf sendmail /usr/share/doc/$PACKAGE;
 
43
                ;;
 
44
 
 
45
        abort-upgrade)
 
46
                ;;
 
47
 
 
48
        *)
 
49
                echo "$PACKAGE preinst called with unknown argument \`$1'" >&2;
 
50
                exit 1;
 
51
                ;;
 
52
        esac;
 
53
 
 
54
#DEBHELPER#
 
55
exit 0;