3 # Wait for the default route to be up
8 # PROVIDE: defaultroute
9 # REQUIRE: devd netif network_ipv6
16 start_cmd="defaultroute_start"
21 # Return without waiting if we don't have dhcp interfaces.
22 # Once we can test that the link is actually up, we should
23 # remove this test and always wait.
24 dhcp_interfaces=`list_net_interfaces dhcp`
25 [ -z "`list_net_interfaces dhcp`" ] && return
27 # Wait for a default route
29 while [ ${delay} -gt 0 ]; do
30 defif=`get_default_if -inet`
31 if [ -n "${defif}" ]; then
32 if [ ${delay} -ne ${if_up_delay} ]; then
37 if [ ${delay} -eq ${if_up_delay} ]; then
38 echo -n "Waiting ${delay}s for an interface to come up: "
43 delay=`expr $delay - 1`