<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'DejaVu Sans Mono'; font-size:9pt; font-weight:400; font-style:normal;">Am Monday 04 May 2009 16:39:57 Michael Meskes wrote:<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>&gt; &gt; ++        # Why is sleep used here (in case of error)?<br>
&gt; &gt;           sleep .2<br>
&gt; Should have answered this one too. I think the reason for this is to give<br>
&gt; your system some time to generate the device file after inserting the<br>
&gt; module.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>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?!<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>It's just 0.2s after all, but I'd like to have a reference in the comment there why/when it's required.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>&gt; Anyway, here's how I plan to fix the delay:<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>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.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Thanks for looking into this and improving/fixing this.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>&gt;<br>
&gt; @@ -150,14 +150,15 @@<br>
&gt;      begin_msg "Starting VirtualBox kernel module"<br>
&gt;      if ! running vboxdrv; then<br>
&gt;          if [ "$LOAD_VBOXDRV_MODULE" = 1 ]; then<br>
&gt; -                if ! find /lib/modules/`uname -r` -name "vboxdrv\.*" 2&gt;/dev/null|grep -q<br>
&gt; vboxdrv; then -                    failure "No suitable module for running kernel found"<br>
&gt; -                fi<br>
&gt;                  if ! rm -f $DEVICE; then<br>
&gt;                      failure "Cannot remove $DEVICE"<br>
&gt;                  fi<br>
&gt;                  if ! modprobe vboxdrv &gt; /dev/null 2&gt;&amp;1; then<br>
&gt; -                    failure "modprobe vboxdrv failed. Please use 'dmesg' to find<br>
&gt; out why" +                        if ! find /lib/modules/`uname -r` -name "vboxdrv\.*"<br>
&gt; 2&gt;/dev/null|grep -q vboxdrv; then +                            failure "No suitable module for<br>
&gt; running kernel found"<br>
&gt; +                        else<br>
&gt; +                                failure "modprobe vboxdrv failed. Please use 'dmesg' to<br>
&gt; find out why" +                        fi<br>
&gt;                  fi<br>
&gt;          else<br>
&gt;                  succ_msg<br>
&gt;<br>
&gt; Not tested yet, but I think this way we get the 10 second delay only if<br>
&gt; something goes wrong.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Cheers,<br>
Daniel<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p></body></html>