]>
Commit | Line | Data |
---|---|---|
ba2f1a67 FG |
1 | #! /bin/sh |
2 | ||
3 | # Abort if any command returns an error value | |
4 | set -e | |
5 | ||
6 | case "$1" in | |
7 | configure) | |
8 | ||
9 | # There are three sub-cases: | |
10 | if test "${2+set}" != set; then | |
11 | # We're being installed by an ancient dpkg which doesn't remember | |
12 | # which version was most recently configured, or even whether | |
13 | # there is a most recently configured version. | |
14 | : | |
15 | ||
16 | elif test -z "$2" -o "$2" = "<unknown>"; then | |
17 | # The package has not ever been configured on this system, or was | |
18 | # purged since it was last configured. | |
19 | : | |
20 | ||
21 | else | |
22 | # Version $2 is the most recently configured version of this | |
23 | # package. | |
24 | : | |
25 | ||
26 | fi ;; | |
27 | abort-upgrade) | |
28 | # Back out of an attempt to upgrade this package FROM THIS VERSION | |
29 | # to version $2. Undo the effects of "prerm upgrade $2". | |
30 | : | |
31 | ||
32 | ;; | |
33 | abort-remove) | |
34 | if test "$2" != in-favour; then | |
35 | echo "$0: undocumented call to \`postinst $*'" 1>&2 | |
36 | exit 0 | |
37 | fi | |
38 | # Back out of an attempt to remove this package, which was due to | |
39 | # a conflict with package $3 (version $4). Undo the effects of | |
40 | # "prerm remove in-favour $3 $4". | |
41 | : | |
42 | ||
43 | ;; | |
44 | abort-deconfigure) | |
45 | if test "$2" != in-favour -o "$5" != removing; then | |
46 | echo "$0: undocumented call to \`postinst $*'" 1>&2 | |
47 | exit 0 | |
48 | fi | |
49 | # Back out of an attempt to deconfigure this package, which was | |
50 | # due to package $6 (version $7) which we depend on being removed | |
51 | # to make way for package $3 (version $4). Undo the effects of | |
52 | # "prerm deconfigure in-favour $3 $4 removing $6 $7". | |
53 | : | |
54 | ||
55 | ;; | |
56 | *) echo "$0: didn't understand being called with \`$1'" 1>&2 | |
57 | exit 0;; | |
58 | esac | |
59 | ||
60 | exit 0 |