On Fri, 14 Dec 2001, Pierre Emmanuel Brinette wrote:
>
> The use of the peer IP is a good idea, but your script only work when you
> have only *ONE* interface using P-t-P. In the case of you use a GRE tunnel
> or a VPN, this command return an IP adress each time it find one.
>
> I have had this problem so I have made this command :
>
> TEST_ADDR=`ifconfig | awk '{ /^ppp0/ && A=FNR; if (FNR == A+1) VAL=$0 }
> END { $0=VAL; print $3 }' | grep "P-t-P" | cut -d":" -f2`
>
Just use /sbin/ifconfig ppp0 and then there will only be the information for
ppp0 present.
> >PEER_IP=`/sbin/ifconfig ppp0 | grep P-t-P | cut -d ':' -f 3 | cut -d ' ' -f 1`
Tim.
--
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t,"
and there was light.
http://locofungus.2y.net/ http://www.locofungus.btinternet.co.uk/
Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se d�sinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe