[Pkg-virtualbox-devel] Bug#526395: Bug#526395: Save ~10s in virtualbox-ose init script
Michael Meskes
meskes at debian.org
Mon May 4 14:39:57 UTC 2009
On Thu, Apr 30, 2009 at 11:31:03PM +0200, Daniel Hahler wrote:
> ++ # Why is sleep used here (in case of error)?
> sleep .2
Should have answered this one too. I think the reason for this is to give your
system some time to generate the device file after inserting the module.
Anyway, here's how I plan to fix the delay:
@@ -150,14 +150,15 @@
begin_msg "Starting VirtualBox kernel module"
if ! running vboxdrv; then
if [ "$LOAD_VBOXDRV_MODULE" = 1 ]; then
- if ! find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then
- failure "No suitable module for running kernel found"
- fi
if ! rm -f $DEVICE; then
failure "Cannot remove $DEVICE"
fi
if ! modprobe vboxdrv > /dev/null 2>&1; then
- failure "modprobe vboxdrv failed. Please use 'dmesg' to find out why"
+ if ! find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then
+ failure "No suitable module for running kernel found"
+ else
+ failure "modprobe vboxdrv failed. Please use 'dmesg' to find out why"
+ fi
fi
else
succ_msg
Not tested yet, but I think this way we get the 10 second delay only if something goes wrong.
Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes at jabber.org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!
More information about the Pkg-virtualbox-devel
mailing list