Hi ... i totally agree with you about the way you check the connection
status .
One thing "Olivier should know is that if his ISP is Wanadoo , daily
deconnection is totally normal becauqse Wanadoo systematiccally
deonnects people at least every 24 hours of connection .
The second is that i no more use the pinging method because my
connection ( with wanadoo as ISP) always brake when i ping too much
often ... i saw an explanation about that in the news
fr.comp.os.linux.configuration but i dont remember the explanation they
gave .
I use instead i script that uses the presence of pppo whent you type
ifconfig ... example for me :
bash-2.05# ifconfig ppp0
ppp0 Link encap:Point-to-Point Protocol
inet addr:193.251.5.117 P-t-P:193.251.5.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:7740 errors:0 dropped:0 overruns:0 frame:0
TX packets:10756 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:1189572 (1.1 Mb) TX bytes:13229736 (12.6 Mb)
if you are not connected , ppp0 is not displayed so that ifconfig ppp0
returns false ....
That's a personal idea ..
Lucas, Roger William (roger) wrote:
>Hi Olivier,
>
>Please excuse the reply in English, but my French is terrible.
>
>I had the same problem and I am also running RedHat 7.2, so hopefully this
>will help....
>My solution to this was to write a CRON script which pings yahoo.com every
>10 minutes. If the ping fails, then the modem is taken off-line and
>restarted.
>
>The log is below.
>
>Some explanations of this.....
>
>I like to have a system log that I can browse and check things have been OK,
>so I use the "logger" command a lot. This is entirely optional.
>
>I have changed the STUSB file to make it work reliably on my machine. It is
>a very old Pentium 133 and it has the "Intel Corporation 430VX - 82437VX TVX
>[Triton VX] (rev 2)" chipset, which is well known to have problems. As a
>result, I put in a lot of extra lines to ensure that all the processes are
>properly killed "kill_all xxxxx" then "killall -9 xxxxx". Sometimes I used
>to get processes left, and they caused problems. This is almost certainly
>down to my very odd PC, so I haven't raised all this back to the group. I
>plan to fit a new USB card in it anyway.
>
>Good luck with this.
>
>Best regards,
>
>Roger
>
>-------------------------------------
>
>[root@philip /etc]# ls cron*
>
>crontab
>
>cron.d:
>kmod
>
>cron.daily:
>0anacron inn-cron-expire logrotate makewhatis.cron slocate.cron sysstat
>tmpwatch
>
>cron.hourly:
>inn-cron-nntpsend inn-cron-rnews sysstat
>
>cron.monthly:
>0anacron
>
>cron.tenminutes:
>check_adsl
>
>cron.weekly:
>0anacron makewhatis.cron
>
>[root@philip /etc]# cat crontab
>SHELL=/bin/bash
>PATH=/sbin:/bin:/usr/sbin:/usr/bin
>HOME=/
>
># run-parts
>*/10 * * * * root run-parts /etc/cron.tenminutes
>01 * * * * root run-parts /etc/cron.hourly
>02 4 * * * root run-parts /etc/cron.daily
>22 4 * * 0 root run-parts /etc/cron.weekly
>42 4 1 * * root run-parts /etc/cron.monthly
>
>[root@philip /etc]# cat cron.tenminutes/check_adsl
>#!/bin/sh
># Check connection to Yahoo
># If it returns zero then we are OK
># If it fails then stop and then restart the modem
>if ping -c 1 yahoo.com > /dev/null ; then
> logger -id CRON check of ADSL reports OK
>else
> logger -isd CRON check of ADSL link failed - restarting...
>
> # This is a real hammer to crack a nut, but the modem just doesn't
> # seem to cleanly restart otherwise.....
> # "stusb stop" kills all the pppd and modem_run processes
> # "stusb start" then restarts the modem drivers and logs us back in.
>
> stusb stop
> stusb start
>fi
>
>[root@philip /etc]# which stusb
>/usr/sbin/stusb
>
>[root@philip /etc]# cat /usr/sbin/stusb
>#!/bin/bash
>#
># stusb
>#
># this will start and stop the Alcatel SpeedTouch USB ADSL adapter
># this script is based on the two scripts provided by Johan Dijoux
>#
># [EMAIL PROTECTED]
># Mon Sep 3 2001
>#
>RETVAL=0
>prog="stusb"
>if [ ! -e /usr/lib/speedtouch/mgmt.o ]
> then echo 'You need the microcode from the Alcatel driver';
> echo 'RTFM and then';
> echo 'place it under /usr/lib/speedtouch/mgmt.o';
> exit 1;
>fi
>
>
>case "$1" in
> start)
> route del default
> modprobe n_hdlc >& /tmp/pppd.log
> modprobe ppp_synctty &> /tmp/pppd.log
> modem_run -v 2 -f /usr/lib/speedtouch/mgmt.o -m
> pppd call adsl &> /tmp/pppd.log &
> ;;
> stop)
> killall modem_run
> killall pppd
> killall noip
> killall pppoa3
>
> killall -9 modem_run
> killall -9 pppd
> killall -9 noip
> killall -9 pppoa3
>
> rm -f /var/run/ppp*
> rmmod usb-uhci
> sleep 2
> modprobe usb-uhci
> sleep 2
> ;;
> *)
> echo $"Usage: $0 {start|stop}"
> RETVAL=1
>esac
>exit $RETVAL
>[root@philip /etc]#
>
>
>-----Original Message-----
>From: Olivier Guerreau [mailto:[EMAIL PROTECTED]]
>Sent: 14 May 2002 09:47
>To: [EMAIL PROTECTED]
>Subject: [speedtouch] Script de reconnexion automatique
>
>
>Hello,
>
>j'utilise monmodem speedtouch sur ma RH 7.2 sans probleme, maisj'ai une
>deconnection (ou deconnexion je sais pas trop) qui arrive tous les 2/3
>jours. Est-ce qu'il existe un script de reconnection automatique????
>
>Merci et @+
>Olivier
>
>
>
>
>Liste de diffusion modem ALCATEL SpeedTouch USB
>Pour se desinscrire :
>mailto:[EMAIL PROTECTED]?subject=unsubscribe
>
>
>
>
>Liste de diffusion modem ALCATEL SpeedTouch USB
>Pour se d�sinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe
>
>
>
>
>
Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se d�sinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe