--
Meron Lavie
www.redmatch.com - World's Largest Hi-Tech Salary Site
la...@net2vision.net.il
NOTE: THERE ARE NO DIGITS IN MY REAL EMAIL ADDRESS (ANTI-SPAM)
> Is there a more elegant way than "killall pppd" to stop pppd?
I thought there was a command called: "ppp-down" which can be used to
terminate/stop the pppd process. Effectively, it does a "killall pppd" in the
background, but does it more gracefully (if that is possible).
See ya
Dean Thompson
--
+____________________________+____________________________________________+
| Dean Thompson | E-mail - Dean.T...@csse.monash.edu.au |
| Bach. Computing (Hons) | ICQ - 45191180 |
| PhD Student | Office - <Off-Campus> |
| School Comp.Sci & Soft.Eng | Phone - +61 3 9903 2787 (Gen. Office) |
| MONASH (Caulfield Campus) | Fax - +61 3 9903 1077 |
| Melbourne, Australia | |
+----------------------------+--------------------------------------------+
Use:
kill -HUP `cat /var/run/ppp0.pid`
Or use the "linkname" option (to avoid interface-name dependencies)
and do something like this:
kill -HUP `cat /var/run/ppp-mylink.pid`
(Assuming you use "linkname mylink" in one of the PPP options files.)
--
James Carlson, Internet Engineering <james.d...@east.sun.com>
SUN Microsystems / 1 Network Drive 71.234W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.497N Fax +1 781 442 1677
Second Edition now available - http://people.ne.mediaone.net/carlson/ppp
>Is there a more elegant way than "killall pppd" to stop pppd?
What is inelegant about that? It sends a signal to pppd and pppd
receives the signal, cleans itself up by removing lock files and various
run files, sends a message to the far side saying it is hanging up, and
then hangs up, runs ip-down script and finally stops.
If you want you could write a shell script
pppd_please_stop
#!/bin/bash
killall pppd
and then run pppd_please_stop instead if it makes you feel better.
You could try the ifdown script but then that tries to read a file (
/var/run/ppp0) readable only by root, so you would have to make it suid
root, and get around the bash shell's refusal to run suid root scripts,
and when all is said and done, all it does is run
kill pid_of_pppd
which is the same as killall pppd does much more elegantly.
Note that killall pppd is NOT the same as killall -9 pppd since the
latter stops pppd in its tracks, not allowing it to anythings befor it
is shut down brutally.
.
>I thought there was a command called: "ppp-down" which can be used to
>terminate/stop the pppd process. Effectively, it does a "killall pppd" in the
>background, but does it more gracefully (if that is possible).
No it does not. All it does is
kill <PID of pppd>
after trying to find the PID of pppd, something which killall does
automagically.
This is as elegant as can get, unless you have two pppds running.
Peter
poff
you wont get it easier...
"hollo" <gee...@yahoo.dk> wrote in message
news:20010429.194949...@hollo.molle.net...
>kill $(pidof pppd)
Is this more elegant than killall pppd, which does exactly what this
does, but with one less program to run.
Mind you , I have no idea what his idea of elegance is.
Aaron
"Bill Unruh" <un...@physics.ubc.ca> wrote in message
news:9clhm7$qbn$1...@nntp.itservices.ubc.ca...