On Fri, 31 Jan 2003 18:01, Col wrote: > Is there an easier/better way for a user to obtain ppp0 ip address than > > IP=$(netstat -rn | grep UH | cut -d" " -f1 | head -n 1)
Quoting the pppd man page /etc/ppp/ip-up A program or script which is executed when the link is available for sending and receiving IP packets (that is, IPCP has come up). It is executed with the parameters interface-name tty-device speed local-IP-address remote-IP-address ipparam So, inside that script, the variable $4 will contain the IP-address you isp has alotted to you. Is that what you wanted? -- Sincerely etc., Christopher Sawtell