~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal

« back to all changes in this revision

Viewing changes to debian/open-vm-dkms.postinst

  • Committer: Bazaar Package Importer
  • Author(s): Evan Broder
  • Date: 2009-12-18 20:18:42 UTC
  • Revision ID: james.westby@ubuntu.com-20091218201842-izwxnjaqk9od4auq
Tags: 2009.11.16-210370-1+ubuntu1
* Recommend open-vm-toolbox in open-vm-tools. (LP: #391224)
* Add support for dkms - based on patch from Greek Ordono. (LP: #277556)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# Copyright (C) 2002-2005 Flavio Stanchina
 
3
# Copyright (C) 2005-2006 Aric Cyr
 
4
# Copyright (C) 2007 Mario Limonciello
 
5
# Copyright (C) 2009 Alberto Milone
 
6
 
 
7
NAME=open-vm-tools
 
8
PACKAGE_NAME=open-vm-dkms
 
9
CVERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2`
 
10
 
 
11
ARCH=`dpkg --print-architecture`
 
12
case $ARCH in
 
13
        amd64)
 
14
                ARCH="x86_64"
 
15
                ;;
 
16
        lpia|i?86)
 
17
                ARCH="i686"
 
18
                ;;
 
19
esac
 
20
 
 
21
case "$1" in
 
22
        configure)
 
23
                for POSTINST in /usr/lib/dkms/common.postinst /usr/share/$PACKAGE_NAME/postinst; do
 
24
                        if [ -f $POSTINST ]; then
 
25
                                $POSTINST $NAME $CVERSION /usr/share/$PACKAGE_NAME $ARCH $2
 
26
                                exit $?
 
27
                        fi
 
28
                        echo "WARNING: $POSTINST does not exist."
 
29
                done
 
30
                echo "ERROR: DKMS version is too old and $PACKAGE_NAME was not"
 
31
                echo "built with legacy DKMS support."
 
32
                echo "You must either rebuild $PACKAGE_NAME with legacy postinst"
 
33
                echo "support or upgrade DKMS to a more current version."
 
34
                exit 1
 
35
        ;;
 
36
 
 
37
        abort-upgrade|abort-remove|abort-deconfigure)
 
38
        ;;
 
39
 
 
40
        *)
 
41
                echo "postinst called with unknown argument \`$1'" >&2
 
42
                exit 1
 
43
        ;;
 
44
esac
 
45
 
 
46
#DEBHELPER#