Subject: Re: PATCH WAS( Re: [ANNOUNCE] iproute2 v2.6.25

From: Patrick McHardy <[email-masked]>
Date: Sat, 19 Apr 2008 18:45:35 +0200

jamal wrote:
> On Fri, 2008-18-04 at 16:22 +0200, Patrick McHardy wrote:
>
>   
>> Yes, that sucks (ran into the same problem with iproute in a
>> previous job). I added the ENV dump format to libnl a couple
>> of years ago (NAME=val), should be easy to add a set of simple
>> tools to get the information and export it in the environment.
>>     
>
> Can you explain this a little? Would these variables define what
> the command line parameters look like before invoking?

I imagine something like this:

# nl-link-dump env eth0

LINK_NAME=eth0
LINK_IFINDEX=2
LINK_LLADDR=.....
LINK_OPERSTATE=...

and so on. You could then do something like this:

export $(nl-link-dump env eth0)

and use $LINK_... in your scripts.