On Thursday 04 December 2003 14:12, tien hai nguyen wrote:
> hi dear list !!
> I use a Debian, with a thomson speedtouch 330 usb
> I want to start my adsl when I plug my modem, I want hotplug to start or
> stop my connection automatically.
>
> my usb.usermap looks like this:
> speedtouch 0x0003 0x06b9 0x4061 0x0000 ...
>
> my /etc/hotplug/usb.speedtouch looks like this :
> #! /bin/bash
> case $ACTION in
> add)
> modem_run -f /usr/lib/speedtouch/mgmt.o
> pppd call adsl
> ;;
> remove)
> killall modem_run
> killall pppd
> ;;
> esac
>
>
> It does not work, I can't connect to the internet.
>
Save yourself the bother use the speedtouch package from sid works brilliantly
for me.
Below is my /etc/hotplug/us/speedtouch (must be executable)
#!/bin/sh -e
PATH=/sbin:/bin:/usr/sbin:/usr/bin
export PATH
# add -k when using the kernel mode driver
MODEM_RUN_OPTIONS="-s -k"
# modem firmware
FIRMWARE_FILE="/usr/share/speedtouch/mgmt.o"
# a PPP peer to call
PPPD_PEER="speedtouch"
# you can use this file to change the default configuration
[ -f /etc/defaults/speedtouch ] && . /etc/defaults/speedtouch
##############################################################################
if [ ! -e "$FIRMWARE_FILE" ]; then
echo "Cannot find $FIRMWARE_FILE."
exit 1
fi
if [ ! -f /proc/bus/usb/devices ]; then
if ! mount -t usbdevfs none /proc/bus/usb 2> /dev/null; then
echo "Cannot mount the USB device filesystem."
exit 1
fi
fi
##############################################################################
load_firmware() {
if modem_run $MODEM_RUN_OPTIONS -f $FIRMWARE_FILE; then
if [ "$PPPD_PEER" ]; then
sleep 5
modprobe -k pppoatm
pppd call $PPPD_PEER
fi
else
echo "Cannot initialize the modem."
exit 1
fi
return 0
}
# This is needed to work around a bug of modem_run not noticing that
# the modem has been unplugged. See #218795 for details.
setup_remover() {
[ "$REMOVER" ] || return 0
{
echo "#!/bin/sh"
[ "$PPPD_PEER" ] && printf "poff $PPPD_PEER\nsleep 5\n"
echo "killall modem_run"
} >> $REMOVER
chmod +x $REMOVER
return 0
}
##############################################################################
case "$ACTION" in
add)
load_firmware
setup_remover
;;
esac
exit 0
Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se d�sinscrire : mailto:[EMAIL PROTECTED]