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
10
PACKAGE_NAME=$NAME-dkms
11
CVERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2`
12
ARCH=`dpkg --print-architecture`
15
for POSTINST in /usr/lib/dkms/common.postinst "/usr/share/$PACKAGE_NAME/postinst"; do
16
if [ -f "$POSTINST" ]; then
17
"$POSTINST" "$NAME" "$CVERSION" "/usr/share/$PACKAGE_NAME" "$ARCH" "$2"
20
echo "WARNING: $POSTINST does not exist." >&2
22
echo "ERROR: DKMS version is too old and $PACKAGE_NAME was not" >&2
23
echo "built with legacy DKMS support." >&2
24
echo "You must either rebuild $PACKAGE_NAME with legacy postinst" >&2
25
echo "support or upgrade DKMS to a more current version." >&2
34
abort-upgrade|abort-remove|abort-deconfigure)
38
echo "postinst called with unknown argument \`$1'" >&2
43
# dh_installdeb will replace this with shell code automatically
44
# generated by other debhelper scripts.