summaryrefslogtreecommitdiffstats
path: root/debian/scripts/prerm-dkms
diff options
context:
space:
mode:
Diffstat (limited to 'debian/scripts/prerm-dkms')
-rw-r--r--debian/scripts/prerm-dkms10
1 files changed, 10 insertions, 0 deletions
diff --git a/debian/scripts/prerm-dkms b/debian/scripts/prerm-dkms
new file mode 100644
index 0000000..6e93a1b
--- /dev/null
+++ b/debian/scripts/prerm-dkms
@@ -0,0 +1,10 @@
+DKMS_NAME=#MODULE_NAME#
+DKMS_VERSION=#MODULE_VERSION#
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ if [ "$(dkms status -m $DKMS_NAME -v $DKMS_VERSION)" ]; then
+ dkms remove -m $DKMS_NAME -v $DKMS_VERSION --all
+ fi
+ ;;
+esac