guest bootup waits for init, not for network stack (fixes 2.6.27 guest kernels)

This commit is contained in:
Martin Willi
2008-10-07 16:31:41 +00:00
parent 693a244d0f
commit c8ba5125d6
+3 -20
View File
@@ -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);
}
} }
} }