On Tue, Jun 14, 2016 at 08:55:05AM +0200, Alexander Aring wrote: > This patch removes the deletion of ip env and changes to the behaviour > that it use previous ip=$TYPE assignments if ip env is not part of network > env which will be sourced. > > Example: > somewhere in shell: ip=dhcp > \- in case of ip=$TYPE in network env: overwrites the ip env > \- in case of NO ip=$TYPE in network env: use the ip="dhcp" from shell > > Signed-off-by: Alexander Aring <aar@xxxxxxxxxxxxxx> > --- > Don't know if this patch breaks to much handling with previous env handling, > but I would except such handling. > > Also don't know if the example is correct or I mixed something with > global/local envs. > > Maybe apply patch 2/2 only. > > net/ifup.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/net/ifup.c b/net/ifup.c > index f22afc9..17e1b2f 100644 > --- a/net/ifup.c > +++ b/net/ifup.c > @@ -62,8 +62,6 @@ int ifup(const char *name, unsigned flags) > > env_push_context(); > > - setenv("ip", ""); > - Erm, no. It was intentional to *not* leak in previous settings of the ip variable to make the behaviour deterministic and not dependent on previous env settings. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox