guest bootup waits for init, not for network stack (fixes 2.6.27 guest kernels)
This commit is contained in:
+3
-20
@@ -209,31 +209,14 @@ static int exec(private_mconsole_t *this, void(*cb)(void*,char*,size_t),
|
|||||||
*/
|
*/
|
||||||
static bool wait_bootup(private_mconsole_t *this)
|
static bool wait_bootup(private_mconsole_t *this)
|
||||||
{
|
{
|
||||||
int res;
|
/* wait for init process to appear */
|
||||||
|
while (request(this, ignore, NULL, "exec ps -p 1 > /dev/null"))
|
||||||
while (TRUE)
|
|
||||||
{
|
{
|
||||||
res = request(this, ignore, NULL, "config eth9=mcast");
|
|
||||||
if (res < 0)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
if (res == 0)
|
|
||||||
{
|
|
||||||
while (request(this, ignore, NULL, "remove eth9") != 0)
|
|
||||||
{
|
|
||||||
usleep(50000);
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
if (this->idle)
|
if (this->idle)
|
||||||
{
|
{
|
||||||
this->idle();
|
this->idle();
|
||||||
}
|
}
|
||||||
else
|
usleep(100000);
|
||||||
{
|
|
||||||
usleep(50000);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user