VirtualBox

source: vbox/trunk/debian/preinst@ 5859

Last change on this file since 5859 was 5859, checked in by vboxsync, 17 years ago

deb/rpm/run: Remove any old kernel module of the current kernel before compiling a new one in '/etc/init.d/vboxdrv setup'. Use "vboxdrv\.*" instead of vboxdrv\* for finding them.

File size: 744 bytes
Line 
1#!/bin/bash -e
2
3. /usr/share/debconf/confmodule
4db_version 2.0
5db_capb backup
6
7# check for old vboxdrv modules
8if find /lib/modules -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then
9 # old modules found
10 db_get virtualbox-ose/delete-old-modules
11 if [ "$RET" = "false" ]; then
12 cat << EOF
13Old vboxdrv kernel modules found in
14EOF
15 find /lib/modules -name "vboxdrv\.*" 2>/dev/null|sed "s+\(.*\)+ \1+g"
16 cat << EOF
17Removing of these modules denied by debconf setting
18EOF
19 else
20 db_input critical virtualbox-ose/delete-old-modules || true
21 db_go || true
22 db_get virtualbox-ose/delete-old-modules
23 if [ "$RET" = "true" ]; then
24 find /lib/modules -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null
25 fi
26 fi
27fi
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette