I got my speedtouch working years ago on RH 8 or so, and I don't have this
hotplug SysV service, but what I do is rmmod usb-uhci which basically powers
down the whole USB port and then bring it back up with a modprobe.

Pasted is a copy of a script that I run every 10 minutes or so with CRONTAB
that checks to see if my connection is still up - if not it hard boots the
whole damn thing just in case. The downside to this is the fact that I have
a USB-attached hard disk for my mp3s and if I was synching my iPod or
something at the same time my connection dropped then I would lose power to
the HDD as well. Oh, yes - the script will also give up after X times as
defined in /tmp/adslcount

Could anyone tell me a bit more about this hotplug service - would it
overcome the problem I have just described below or would it also "boot" the
USB HDD?

Herewith the script:

#!/bin/bash
PATH=$PATH:/sbin
export PATH

INTERFACE="ppp0"
RESTART="false"

RESULT=`ifconfig $INTERFACE 2>&1`
NOTFOUND=`echo $RESULT | grep 'Device not found'`
echo $RESULT
if [ "$NOTFOUND" != "" ] ; then
    echo "Interface not found"
    RESTART="true"
fi

if [ $RESTART == "false" ]; then
    PTPADDR=`ifconfig $INTERFACE | grep 'P-t-P' | gawk '{print $3}' | gawk
-F ':
' '{print $2}'`
    PINGRES=`ping -n -c 5 $PTPADDR -w 5 | grep 'loss'`
    PERCENT=`echo $PINGRES | gawk '{print $6}'`

    if [ $PERCENT == "100%" ]; then
        RESTART="true"
    fi
fi

# read counter
touch /tmp/adslcount
RETRYCOUNT=`cat /tmp/adslcount`
MAXRETRYCOUNT=`cat /tmp/adslmax`
if [ "$RESTART" == "true" ]; then
    if [ "$RETRYCOUNT" == "$MAXRETRYCOUNT" ]; then
        RESTART="false"
        echo "Retry reached - not starting"
    else
        /bin/inc.pl $RETRYCOUNT >/tmp/adslcount
        echo "Retry Count"
        echo $RETRYCOUNT
        RESTART="true"
    fi
fi

if [ "$RESTART" == "true" ]; then
    echo "Restarting ADSL" | mail [EMAIL PROTECTED]
    killall -9 modem_run
    echo "Restarting ADSL"
    date >>/var/log/adsl
    echo "Restarting ADSL" >>/var/log/adsl
    /usr/bin/killall -9 pppd
    sleep 5
    echo "Killing USB"
    rmmod usb-uhci
    sleep 5
    echo "Rise from the dead..."
    modprobe usb-uhci
    sleep 5
    echo "Lets hit this modem"
    mount none /proc/bus/usb -t usbdevfs
    /usr/local/bin/modem_run -v 2 -m -f /lib/mgmt.o
    /bin/dial.internet <--- some wrapper script I have because I've changed
ISPs 3 times now and have different connect scripts for each
fi

-----Original Message-----
From: Duncan Sands [mailto:[EMAIL PROTECTED] 
Sent: 27 January 2004 10:47
To: [EMAIL PROTECTED]; Richard Fieldsend
Subject: [speedtouch] Re: Starting my adsl connection.



> I've successfully installed speedbundle, and everything works great 
> most of the time. However, when I boot up sometimes the connection to 
> the internet doesn't startup. I su to root and run pppd call speedtch
>
> The output reads:-
>
> Plugin pppoatm.so loaded
> PPPoATM plugin_init
> PPPoATM setdevname - remove unwanted options
> PPPoATM setdevname_pppoatm - SUCCESS:0.38
> connect(0.38): No such device
>
> When I reboot at this time the connection gets setup. I've tried 
> logging out, and logging back in again, but no luck.
>
> Any suggestions?

What do you see in /proc/net/atm/speed* ?
Rather than unplugging, you can try to restart
using
        /etc/init.d/hotplug restart

Ciao,

Duncan.


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

        

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

        

Reply via email to