From 12cf594c688f3bc3e0b26d35305d5d6db7036fc4 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Mon, 14 May 2001 21:45:51 +0000 Subject: Have the wait_message() with the sleep() --- mdk-stage1/network.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'mdk-stage1/network.c') diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c index 2b32ae615..dff02064a 100644 --- a/mdk-stage1/network.c +++ b/mdk-stage1/network.c @@ -167,10 +167,6 @@ int configure_net_device(struct interface_info * intf) intf->is_up = 1; - /* I need to sleep a bit in order for kernel to finish init of the - network device; if not, first sendto() will get an EINVAL */ - sleep(2); - return 0; } @@ -421,6 +417,16 @@ static enum return_type setup_network_interface(struct interface_info * intf) if (configure_net_device(intf)) return RETURN_ERROR; + + if (intf->boot_proto == BOOTPROTO_STATIC) { + /* I need to sleep a bit in order for kernel to finish + init of the network device; if not, first sendto() for + gethostbyaddr will get an EINVAL. */ + wait_message("Bringing up networking..."); + sleep(2); + remove_wait_message(); + } + return add_default_route(); } -- cgit v1.2.1