[oe] [RFC][PATCH] netbase: don't start udhcpc if kernel assigned IP statically

Phil Blundell philb at gnu.org
Mon Sep 21 19:45:06 UTC 2009


On Mon, 2009-09-21 at 12:07 -0400, Denys Dmytriyenko wrote:
>  iface eth0 inet dhcp
> +        pre-up /bin/grep -v -e "ip=[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+" /proc/cmdline > /dev/null
> +

This is pretty gruesome.  It will introduce an extra two fork+exec's
worth of overhead to every "ifup eth0" for everybody, and it also fails
to check that the ip= parameter actually corresponded to eth0 (i.e. it
would stop eth0 coming up even if the parameter was specifying an
address for eth1).  

It seems like there must be a better way of solving this problem.  How
about just teaching "ifup -a" to spot interfaces that are already up and
leave them alone?

p.






More information about the Openembedded-devel mailing list