Debian Codegraph @

testing/guestbin/wait-until-network-ready

raw
1 #!/bin/sh
2
3 # Wait until the network has started - based on default route
4
5 count=20
6 until [ $count -eq 0 ] || [ -n "`ip route list | grep default`" ] >/dev/null 2>&1
7 do
8 count=`expr $count - 1`
9 sleep 1
10 done
11