#!/bin/bash
modprobe ppp_generic
modprobe pppoatm
modprobe br2684
count=0
while [[ $((count++)) -lt 40 ]]
do
  sync=$(dmesg | grep 'ADSL line is up')
  if [ ! -z "$sync" ]
  then
    br2684ctl -b -c 0 -a 8.35
    sleep 3
    ifconfig nas0 192.168.0.1 netmask 255.255.255.0 up
    sleep 10
    pppd call speedy
    exit 0
  fi
  sleep 1
done
echo "El firmware Speedtouch no se cargó"
