]>
Commit | Line | Data |
---|---|---|
8514874f DM |
1 | #! /bin/sh |
2 | ||
3 | # Abort if any command returns an error value | |
4 | set -e | |
5 | ||
6 | # This script is called as the last step of the installation of the | |
7 | # package. All the package's files are in place, dpkg has already | |
8 | # done its automatic conffile handling, and all the packages we depend | |
9 | # of are already fully installed and configured. | |
10 | ||
11 | # The following idempotent stuff doesn't generally need protecting | |
12 | # against being run in the abort-* cases. | |
13 | ||
14 | case "$1" in | |
15 | configure) | |
16 | # Configure this package. If the package must prompt the user for | |
17 | # information, do it here. | |
18 | ||
19 | # install release key | |
20 | echo -n "installing proxmox release key: " | |
21 | /usr/bin/apt-key add '/usr/share/doc/proxmox-ve/proxmox-release@proxmox.com.pubkey' || /bin/true | |
22 | ||
81c0c4aa DM |
23 | # setup kernel links for installation CD (rescue boot) |
24 | mkdir -p /boot/pve | |
25 | ln -sf /boot/vmlinuz-@KVNAME@ /boot/pve/vmlinuz | |
26 | ln -sf /boot/initrd.img-@KVNAME@ /boot/pve/initrd.img | |
27 | ||
8514874f DM |
28 | # There are three sub-cases: |
29 | if test "${2+set}" != set; then | |
30 | # We're being installed by an ancient dpkg which doesn't remember | |
31 | # which version was most recently configured, or even whether | |
32 | # there is a most recently configured version. | |
33 | : | |
34 | ||
35 | elif test -z "$2" -o "$2" = "<unknown>"; then | |
36 | # The package has not ever been configured on this system, or was | |
37 | # purged since it was last configured. | |
38 | : | |
39 | ||
40 | else | |
41 | # Version $2 is the most recently configured version of this | |
42 | # package. | |
43 | : | |
44 | ||
45 | fi ;; | |
46 | abort-upgrade) | |
47 | # Back out of an attempt to upgrade this package FROM THIS VERSION | |
48 | # to version $2. Undo the effects of "prerm upgrade $2". | |
49 | : | |
50 | ||
51 | ;; | |
52 | abort-remove) | |
53 | if test "$2" != in-favour; then | |
54 | echo "$0: undocumented call to \`postinst $*'" 1>&2 | |
55 | exit 0 | |
56 | fi | |
57 | # Back out of an attempt to remove this package, which was due to | |
58 | # a conflict with package $3 (version $4). Undo the effects of | |
59 | # "prerm remove in-favour $3 $4". | |
60 | : | |
61 | ||
62 | ;; | |
63 | abort-deconfigure) | |
64 | if test "$2" != in-favour -o "$5" != removing; then | |
65 | echo "$0: undocumented call to \`postinst $*'" 1>&2 | |
66 | exit 0 | |
67 | fi | |
68 | # Back out of an attempt to deconfigure this package, which was | |
69 | # due to package $6 (version $7) which we depend on being removed | |
70 | # to make way for package $3 (version $4). Undo the effects of | |
71 | # "prerm deconfigure in-favour $3 $4 removing $6 $7". | |
72 | : | |
73 | ||
74 | ;; | |
75 | *) echo "$0: didn't understand being called with \`$1'" 1>&2 | |
76 | exit 0;; | |
77 | esac | |
78 | ||
79 | exit 0 |