[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Elementary Script Questions



On Mon, 28 Dec 1998, Brian Roland wrote:

> Aloha,
> 
> I'm trying to build some simple sh scripts, and not having much luck.
> 
> The first attempt is a chat script for pppd that redials two 
> alternating phone numbers on BUSY rather than aborting.  I can't find 
> any docs on chat at all :/
'man chat' perhaps ? If you need that I can send you
the result of the command on a Linux box.
Guess you could also browse into the pppd-2-... tgz
package.

> 
> The second, is to build a script for sh that will find the pid for 
> pppd and kill it.  I'm hoping I can figure this one out on my own, 
> since I can find docs for sh :)  But if you'd like to help...feel 
> free.
> 
pppd creates a file "pppn.pid"

from 'man pppd' (version 2.2.0) :

       /var/run/pppn.pid (BSD or Linux), /etc/ppp/pppn.pid (others)
              Process-ID for pppd process on ppp interface unit n.

All you got to do is 
kill -9 `cat /var/run/ppp0.pid` (mind the bacquotes !)


> Thanks much,
> Brian
You're welcome.

> --WAA01094.914904314/master.localink4.com--
> 
> 
> 
> End of Original message
> 

---- 
Fabrice Gamberini.  Software Integration -- ABS - PCD. 
tel: + 33 (0) 1 55 66 34 24  , e-mail: gamberin@art.alcatel.fr