[Q] PPP - ip-up.d
grail at goldweb.com.au
Mon Jun 10 22:05:54 EST 2002
On Monday, June 10, 2002, at 02:43 , Donovan J. Edye wrote:
> I want to take some action only when a particular connection is
> dialled. I
> realise I can use /etc/ppp/ip-up.d to run scripts I want, but how do I
> distinguish between:
> pon MyCon_One
> pon MyCon_Two
Read the man page for the PPP daemon (on my box, it's pppd(8)), paying
special attention to the section titled "SCRIPTS". It may contain some
I use the "ipparam" option in the /etc/ppp/peers/* files, to do pretty
much what you're doing. This is supposedly [see next paragraph] passed
to your script by pppd as the sixth parameter on the command line. pppd
also sends the authenticated peer's name as "PEERNAME" (but only if
authentication is performed, and completed successfully).
I've had problems with $6 not being set to the value of the "ipparam"
option in the ip-down script, so I end up resorting to using the
PEERNAME environment variable - which probably won't do what you want it
to do if those two connections are to the same peer. I should consider
using the "linkname" option, I guess.
One day, I'll get around to figuring out why ipparam isn't passed to
ip-down by pppd (or correcting the man page to conform with the code).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 225 bytes
Desc: not available
Url : http://lists.samba.org/archive/linux/attachments/20020610/f3d88fa2/attachment.bin
More information about the linux