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

Jérôme Pouiller jezz at sysmic.org
Mon Oct 19 10:22:30 UTC 2015


On Monday 19 October 2015 12:15:40 Peter Korsgaard wrote:
> >>>>> "Jérôme" == Jérôme Pouiller <jezz at sysmic.org> writes:
> Hi,
> 
> > I am a bit late to do the review, but why not add a script in
> > 
>  > /etc/network/if-pre-up.d ? For example (notice $IFACE and
>  > $IF_MAXWAIT
>  > are set by ifupdown):
>  > 
>  > #! /bin/sh
>  > if [ "${IF_MAXWAIT}" ]; then
>  > 
>  >     printf "Waiting for interface %s to appear" "${IFACE}"
>  >     while [ ${IF_MAXWAIT} -gt 0 ]; do
>  >     
>  >         if [ -e "/sys/class/net/${IFACE}" ]; then
>  >         
>  >             printf " yes\n"
>  >             exit 0
>  >         
>  >         fi
>  >         sleep 1
>  >         printf "."
>  >         
>  >         : $((wait--))
>  >     
>  >     done
>  >     printf " no.\n"
>  >     exit 1
>  > 
>  > fi
> 
> That's certainly also an option. Care to send a patch reworking the
> logic in S40network to a pre-up.d hook?
Ok, I will.



-- 
Jérôme Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr



More information about the buildroot mailing list