]> oss.titaniummirror.com Git - cp210x.git/blobdiff - debian/prerm.in
Revamp build strategy
[cp210x.git] / debian / prerm.in
diff --git a/debian/prerm.in b/debian/prerm.in
new file mode 100755 (executable)
index 0000000..59babc2
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+PACKAGE=xxPACKAGExx
+VERSION=xxDEBVERxx
+MODULE=xxMODULExx
+
+set -e
+
+case "$1" in
+    remove|upgrade|deconfigure)
+      rmmod $ROOTNAME 2>/dev/null || true
+      if [  "`dkms status -m $PACKAGE`" ]; then
+         dkms remove -m $PACKAGE -v $VERSION --all
+      fi
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+