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