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