On Fri, Sep 14, 2001 at 03:47:09PM -0000, [EMAIL PROTECTED] wrote:
> >>do
> >>    # testing the connection ....
> >>    ping -c10 $ping_host > /dev/null 2>&1
> >>    
> >>    if [ $? -gt 0 ]; then # not connected ...
> >>            # logs
> >>            date >> $log_file
> >>                # cleaning
> >>                /bin/killall pppd  2&>/dev/null
> >>                /bin/rm -f /var/run/ppp*.pid    2&>/dev/null
> >>                /etc/rc.d/nice.sh  2&>/dev/null # firewall down
> >>                sleep 3
> >>                # reconnection
> >>                pppd call adsl # dialing
> >>            sleep 30
> >>                /etc/rc.d/fw.sh 2&>/dev/null # firewall up
> >>        fi
> >>    # the test is done every 30 seconds
> >>    sleep 30
> >>done
> >># faudrait pas en arriver la ...
> >>exit 1
> >>_______________________________________________________________________
> >>
> > What a superb little code snippet!  In the UK BT seems to disconnect 
> > you 3 or 4 times a day.  This saves me loads of grief.  Thanks.
> 
> Umm. The only thing I find a little disconcerting is deleteing the .pid 
> file (which after all should be cleaned up by pppd closing down properly).

Umm :)
I suppose that's because if pppd does not close properly, well the script
will still working...
Anyway even if it's not needed, it doesn't hurt...

Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se d�sinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe

        

Reply via email to