aboutsummaryrefslogtreecommitdiff
path: root/tools/gator/debian/gator-module-dkms.prerm
blob: cf0b5f99da7673636d4b515a1ea741d1a5d7e013 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

NAME=gator-module
PACKAGE_NAME=$NAME-dkms
VERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2`

set -e

case "$1" in
    remove|upgrade|deconfigure)
      if [  "`dkms status -m $NAME`" ]; then
         dkms remove -m $NAME -v $VERSION --all
      fi
    ;;

    failed-upgrade)
    ;;

    *)
        echo "prerm called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

#DEBHELPER#

exit 0