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