* Theofilos Intzoglou (2003-07-18 11:47 +0200)
> On Fri, 18 Jul 2003 11:09:41 +0200
> Thorsten Kampe <[EMAIL PROTECTED]> wrote:
>> I'm stopping pppd in local.stop via "killall pppd"[1] - so the system
>> doesn't hang with an "open" ppp connection. Unfortunately killall
>> gives an error code != 0 when there is no pppd to be killed and
>> therefor local.stop shows two red "!!" (for unsuccesfull).
>> This is just somehow cosmetic but how can I avoid this?
> You could add something like:
> PPPDEX=`ps -e | grep pppd`
> if [ "$PPPDEX" != "" ];then killall pppd;fi
Someone else proposed
if ps -e | grep pppd ; then
killall pppd;
fi
This and yours work fine.
My own solution was
test -f /var/run/ppp0.pid && /usr/bin/killall pppd
But this didn't work (because of the "&&" changing the error code?).
Thorsten
--
[EMAIL PROTECTED] mailing list