Last change
on this file since 6125 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
|
---|
4 | db_version 2.0
|
---|
5 | db_capb backup
|
---|
6 |
|
---|
7 | # check for old vboxdrv modules
|
---|
8 | if 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
|
---|
13 | Old vboxdrv kernel modules found in
|
---|
14 | EOF
|
---|
15 | find /lib/modules -name "vboxdrv\.*" 2>/dev/null|sed "s+\(.*\)+ \1+g"
|
---|
16 | cat << EOF
|
---|
17 | Removing of these modules denied by debconf setting
|
---|
18 | EOF
|
---|
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
|
---|
27 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.