[Pkg-virtualbox-devel] Bug#526395: Bug#526395: Save ~10s in virtualbox-ose init script

Daniel Hahler debian-bugs at thequod.de
Mon May 4 23:04:51 UTC 2009


Am Monday 04 May 2009 16:39:57 Michael Meskes 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.

Is this really needed? After all, the boot process goes on after that, and I 
think loading the module should provide the device file right away?!

It's just 0.2s after all, but I'd like to have a reference in the comment 
there why/when it's required.

> Anyway, here's how I plan to fix the delay:

This looks very good, and is just what I've thought about when you told me 
about the misuse of "modprobe -n" in your previous email.

Thanks for looking into this and improving/fixing this.

>
> @@ -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.


Cheers,
Daniel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-virtualbox-devel/attachments/20090505/14c44a3d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/pkg-virtualbox-devel/attachments/20090505/14c44a3d/attachment.pgp>


More information about the Pkg-virtualbox-devel mailing list