[Buildroot] [PATCH] package/skeleton: add a startup script to wait for slow network interfaces

Peter Korsgaard peter at korsgaard.com
Sat Oct 3 14:01:57 UTC 2015


>>>>> "Peter" == Peter Korsgaard <peter at korsgaard.com> writes:

 >> +wait_for_IF() {
 >> +    IF="$(sed -r -e '/^auto lo/d;' \
 >> +                 -e '/^auto (.+)$/!d;' \
 >> +                 -e 's//\1/;' \
 >> +                 /etc/network/interfaces
 >> +         )"

 > This assumes we have at most 1 interface to wait for.

 > Perhaps we could instead do something like (untested):

 > IFACES=$(awk '/^auto/ { print $2 }' /tmp/interfaces)

That should naturally be /etc/network/interfaces

 > for i in $(seq $WAIT_DELAY); do
 >     for IFACE in $IFACES; do
 >         if [ ! -e "/tmp/$IFACE" ]; then

and /sys/class/net/$IFACE

See, I did actually do a quick test after all ;)

-- 
Bye, Peter Korsgaard



More information about the buildroot mailing list