Mailinglist Archive: opensuse (5130 mails)

< Previous Next >
Re: [SLE] ADSL dies, how to restart it automatically?
  • From: Graham Smith <gqs@xxxxxxxxxxxxxx>
  • Date: Sun, 21 May 2006 02:27:35 +1000
  • Message-id: <200605210227.35342.gqs@xxxxxxxxxxxxxx>
On Sunday 21 May 2006 01:44, Ronald Wiplinger wrote:
> I am using SuSE 10 and have set-up PPPoE to start up automatically. It
> connects fine, but when the connection get lost, it does not re-connect
> anymore.
>
> How can I let it re-connect automatically?

Here is a basic script that tests for a disconnection and if down restarts
PPPoE.

Just add an entry to cron as follows. It checks the PPPoE status every 3
minutes

#min hr day month DOW
4-59/3 * * * * /usr/local/bin/PPPoE.sh 2>&1 /dev/null


---------------------------------- PPPoE.sh ---------------------------
#!/bin/sh
#
# Script to check if PPPoE (dsl0) is disconnected & try reconnecting
# Graham Smith - 01/02/2004
#
# set -x
# Checks the status of device dsl0 for disconnection
result=$(/usr/bin/cinternet -i dsl0 -s | /usr/bin/grep disconnect)
if [ -n "$result" ]
then
/usr/bin/cinternet -i dsl0 -A #Start the interface.
sleep 10
fi
--------------------------------------- EOF ----------------------------------




--
Regards,

Graham Smith

< Previous Next >
References