diff options
author | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-06-04 19:46:20 +0800 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-06-04 19:46:20 +0800 |
commit | d9357d6650ce38ca31d0cfdbcb041ebc32f10f26 (patch) | |
tree | 8f20fbd51edfd1c3f544052dd124c54379ebf9b9 /tools/gator/debian/gator-module-dkms.postinst | |
parent | 20c81608dcd30fc3817d6d430fca83f52b9aa965 (diff) | |
parent | 75ae3ec8fe927285d2220acb87a2fa087b9d5f47 (diff) |
Merge topic branch 'tracking-armlt-gator-5.10' into integration-linux-ux500
Signed-off-by: Philippe Langlais <philippe.langlais@stericsson.com>
Diffstat (limited to 'tools/gator/debian/gator-module-dkms.postinst')
-rwxr-xr-x | tools/gator/debian/gator-module-dkms.postinst | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/tools/gator/debian/gator-module-dkms.postinst b/tools/gator/debian/gator-module-dkms.postinst new file mode 100755 index 00000000000..b3de65e5b06 --- /dev/null +++ b/tools/gator/debian/gator-module-dkms.postinst @@ -0,0 +1,49 @@ +#!/bin/sh +# Copyright (C) 2002-2005 Flavio Stanchina +# Copyright (C) 2005-2006 Aric Cyr +# Copyright (C) 2007 Mario Limonciello +# Copyright (C) 2009 Alberto Milone +# Copyright (C) 2010 Ricardo Salveti de Araujo + +set -e + +NAME=gator-module +PACKAGE_NAME=$NAME-dkms +CVERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2` +ARCH=`dpkg --print-architecture` + +dkms_configure () { + for POSTINST in /usr/lib/dkms/common.postinst "/usr/share/$PACKAGE_NAME/postinst"; do + if [ -f "$POSTINST" ]; then + "$POSTINST" "$NAME" "$CVERSION" "/usr/share/$PACKAGE_NAME" "$ARCH" "$2" + return $? + fi + echo "WARNING: $POSTINST does not exist." >&2 + done + echo "ERROR: DKMS version is too old and $PACKAGE_NAME was not" >&2 + echo "built with legacy DKMS support." >&2 + echo "You must either rebuild $PACKAGE_NAME with legacy postinst" >&2 + echo "support or upgrade DKMS to a more current version." >&2 + return 1 +} + +case "$1" in + configure) + dkms_configure + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 |