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
8
PACKAGE_NAME=open-vm-dkms
9
CVERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2`
11
ARCH=`dpkg --print-architecture`
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
28
echo "WARNING: $POSTINST does not exist."
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."
37
abort-upgrade|abort-remove|abort-deconfigure)
41
echo "postinst called with unknown argument \`$1'" >&2