[Openswan dev] Re: Openswan 2.4.0dr9 multiple defaultroute patch

Norman Rasmussen normanr at gmail.com
Tue Aug 16 16:56:58 CEST 2005


FYI: I've always found that `ip -o` helps with the parsing of `ip addr`

On 16/08/05, Michael Richardson <mcr at sandelman.ottawa.on.ca> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> 
> 
> >>>>> "Paul" == Paul Wouters <paul at xelerance.com> writes:
>     >> How about, instead:
>     >>
>     >> defaultinterface() { phys=`netstat -nr | awk '$1 == "0.0.0.0" &&
>     >> $3 == "0.0.0.0" { print $NF; exit }'`
> 
>     Paul> Can we use the 'ip' command instead? Officially, netstat is
>     Paul> obsoleted on Linux.
> 
>   The output of ip is not as regularly as one would like. (It doesn't
> fall into nice columns. )
> 
>   I'd rather not go and test a lot of software that I intend to rip out
> soon.
> 
> - --
> ] Michael Richardson          Xelerance Corporation, Ottawa, ON |  firewalls  [
> ] mcr @ xelerance.com           Now doing IPsec training, see   |net architect[
> ] http://www.sandelman.ca/mcr/    www.xelerance.com/training/   |device driver[
> ]                    I'm a dad: http://www.sandelman.ca/lrmr/                 [
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.2 (GNU/Linux)
> Comment: Finger me for keys
> 
> iQCVAwUBQwEUtoqHRg3pndX9AQFwWgQAwD8Uk3TLTNvk6Y4lCPSsrkBu3V97eUYy
> 26X8JWWcydhHefNXJjcePQL9cHGtEwylcHx80mnXNFYbjvg9M6s2Rn0QQkwCcTR2
> EUimZ6mV6z3zbjn7AXKbrHdHoD8BuQG4/dTluSeD/nonibgaQeC/1vokXkAy1pHH
> MMPyYHvbVJ0=
> =uQkt
> -----END PGP SIGNATURE-----
> _______________________________________________
> Dev mailing list
> Dev at openswan.org
> http://lists.openswan.org/mailman/listinfo/dev
> 


-- 
- Norman Rasmussen
 - Email: norman at rasmussen.co.za
 - Home page: http://norman.rasmussen.co.za/


More information about the Dev mailing list