Subject: Re: ppp problems all over again.
To: synapse <synapse@gim.net>
From: Dave Huang <khym@bga.com>
List: port-mac68k
Date: 04/01/1997 20:51:06
On Tue, 1 Apr 1997, synapse wrote:
> find...), or anything else. to kill your ppp connection, kill the pppd
> process. do *NOT* kill -9 it, because that will screw up your routing
> tables and you'll have to restart your system to fix it (this took me
> awhile to learn, just thought you might want to know). i have a handy
> little ppp killing script that i chmod 755'd and put in /usr/local/bin
> (doesn't matter really, somewhere convenient. it has:
> 
> kill `ps -auxw|grep pppd|awk '{print $2}'`
> 
> which kills the pppd process. depending how fast this command is, you might
> get a no such process reply, but that process is the other process
> containing "pppd" in it, being the "grep pppd" you just executed :) i guess
> you could throw a sleep 20 in there, but i'm too lazy.

When pppd is running, it creates a file called ppp0.pid containing its own
process ID in /var/run... so, instead of having to ps and grep for pppd, 
you can do

kill `cat /var/run/ppp0.pid`

instead.

Name: Dave Huang     |   Mammal, mammal / their names are called /
INet: khym@bga.com   |   they raise a paw / the bat, the cat /
FurryMUCK: Dahan     |   dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 21 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++