I also had problems with getting ppp to kill reliably.  I put this in
/usr/local/bin, and it seems to work pretty well.  The unfortunate thing I
could never get around is allowing a normal user to kill a 'hung' ppp
process without the su password.  I was going to explore the 'sudo' program,
but then the DSL line got installed.

Nic Steussy

------------------------------------
#!/bin/bash
/sbin/ifdown ppp0
sleep 5
if [ -f /var/run/ppp0.pid ]
   then
   su -c "kill `ps aux | grep watch | grep -v grep | awk '{print $2}'`"
   su -c "kill `ps aux | grep pppd | grep -v grep | awk '{print $2}'`"
fi
echo "He's dead Jim, He's dead."
-----------------------------------

----- Original Message -----
From: "Kevin Diffily" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, October 14, 2000 8:24 PM
Subject: Simple Shell Scripting Question


> I have been unable to create a simple program that will kill a
> running ppp connection.  I have tried
> cat /var/run/ppp0|kill
> echo  /var/run/ppp0|kill
> kill<cat /var/run/ppp0
> etc.
>
> Any help will be appreciated.
>
____________________________________________________________________________
____
> "The Internet treats censorship as damage and routes around it"
>
> InterNetWorkingSolutions
> Your home for Business and Personal Computing Solutions
>
> PO Box 152, Cabot, VT 05647 USA
>
> VOICE: 888.726.9030
> FAX: 888.726.9030
>
> General Information: [EMAIL PROTECTED]
> Website Hosting: [EMAIL PROTECTED]
> Systems Administration Services : [EMAIL PROTECTED]
> Technical Support & Training Services: [EMAIL PROTECTED]
>
____________________________________________________________________________
____
>
>
>
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
>



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to