Click to See Complete Forum and Search --> : script like ip-up.ttyS0


Nabin Limbu
07-12-2003, 07:38 AM
When ppp connection is up in any port, ip-up script is triggered. Is there any script like ip-up.ttyS0, which triggers only when ppp connection is up in a particular port (eg: ttyS0).

mdwatts
07-12-2003, 07:54 AM
Could you please include your distro/version as someone may know specifically where that script (if any) resides.

Have a look at the ifup-ppp or ifcfg-ppp scripts in /etc/sysconfig/network-scripts.

Nabin Limbu
07-12-2003, 08:16 AM
I'm using RH 8 Linux.

/etc/ppp/ip-up and ppp-up are triggered whenever pppd is established in any port.

mdwatts
07-12-2003, 09:23 AM
Unless another member knows of anything, you could try writing your own script.

jumpedintothefire
07-12-2003, 10:25 AM
You'd need to write your own code, and have ip-up.local run it.
pppd will pass some variables to the ip-up.local script.
see:
http://justlinux.com/forum/showthread.php?s=&threadid=44418

you could use something like:

if [ "$2" = "ttyS0" ];then

place your code here, or call a script that has the code