diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:49:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:49:11 +0000 |
commit | f4f3a659b7663cf52c2f2e1fa8e58ed4000e29c9 (patch) | |
tree | 46477e488553a670f4b0346080d3f9a635672104 /debian/virtualbox-dkms.preinst | |
parent | Adding upstream version 7.0.6-dfsg. (diff) | |
download | virtualbox-f4f3a659b7663cf52c2f2e1fa8e58ed4000e29c9.tar.xz virtualbox-f4f3a659b7663cf52c2f2e1fa8e58ed4000e29c9.zip |
Adding debian version 7.0.6-dfsg-1.debian/7.0.6-dfsg-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/virtualbox-dkms.preinst')
-rw-r--r-- | debian/virtualbox-dkms.preinst | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/debian/virtualbox-dkms.preinst b/debian/virtualbox-dkms.preinst new file mode 100644 index 00000000..03ad90b7 --- /dev/null +++ b/debian/virtualbox-dkms.preinst @@ -0,0 +1,23 @@ +#!/bin/sh + +set -e + +#DEBHELPER# + +case "$1" in + install|upgrade) + # These are no longer used + for mod in vboxdrv vboxnetflt vboxnetadp; do + dkms status -m $mod | while read line; do + if echo "$line" | grep -q added > /dev/null || + echo "$line" | grep -q built > /dev/null || + echo "$line" | grep -q installed > /dev/null; + then + version=`echo "$line" | sed "s/$mod,\([^,]*\)[,:].*/\1/;t;d"` + echo "Removing obsolete module $mod version $version" + dkms remove -m $mod -v $version --all + fi + done + done + ;; +esac |