summaryrefslogtreecommitdiff
path: root/scripts/uninstall.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/uninstall.sh')
-rwxr-xr-xscripts/uninstall.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/uninstall.sh b/scripts/uninstall.sh
new file mode 100755
index 0000000..91a0fe6
--- /dev/null
+++ b/scripts/uninstall.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+set -e
+
+source ./scripts/mod_helpers.sh
+
+if test "$(mod_filename compat)" = "compat.ko.gz" ; then
+ compr=".gz"
+elif test "$(mod_filename compat)" = "compat.ko.xz" ; then
+ compr=".xz"
+else
+ compr=""
+fi
+
+for driver in $(find ${BACKPORT_DIR} -type f -name *.ko); do
+ mod_name=${driver/${BACKPORT_DIR}/${KLIB}${KMODDIR}}${compr}
+ echo " uninstall" $mod_name
+ rm -f $mod_name
+done