Hi Bob

at 29.08.2013 10:35, Bob von Knobloch wrote:
...

>
> Hi Juergen,
>
> I'm glad it worked for you.
> I have looked and see no need for your two changes (at least, on the
> version of busybox that I have).
> OK the quotes don't matter as the content of the variables doesn't
> expand, but you are right that it would be better practice to have them
> and I will add them.
> The sed expression is 'caret space star' which removes leading spaces
> (regardless of how many) and seems fine to me. It is needed because "ip
> addr" returns it's output with leading whitespace.

I would still suggest to make it more generic, e.g. don't assume a ppp 
connection. The same script could be used for instances where DHCP is 
used for address renewal. You could make the method for IP distribution 
a variable and place the scripts in a neutral place.

something like this

WAN_DEVICE=ppp0
WAN_ADDR=`ip addr sh dev $(WAN_DEVICE) | grep inet  | sed -e ........

cheers

Erich



------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
------------------------------------------------------------------------
leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/

Reply via email to