|
From: <vk...@ex...> - 2006-06-16 00:49:08
|
> I've recently changed adsl service and my adsl modem and now have a
> problem. If the adsl line goes down, which it does occasionally when it
> feels the need to renegotiate the line rate, the DL network connection
> is disrupted and doesn't recover without manual intervention.
....
> My question is: has anybody else experienced this problem and is it a
> reasonable way to work around it? Is there a better way?
Not sure about a better way but I have the following script running as a
minutely cron job:
#!/bin/bash
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
#echo "Checking the network connection..."
status=`ifconfig | egrep "^ppp0"`
#echo "Result: $status"
if [[ -z "$status" ]]
then
#echo "Oops, network is down. We are in trouble. Stopping ADSL"
pppoe-stop
#echo "Waiting 4 seconds"
sleep 4
#echo "Starting ADSL"
pppoe-start
fi
I tried hooking to ppp-down before but if the box cant reconnect
immediately things get messy.
Regards
Vesselin
|