]>
git.ipfire.org Git - ipfire-2.x.git/blob - src/rc.d/rc.bewanadsl
3 # $Id: rc.bewanadsl,v 1.5.2.6 2005/07/07 20:11:58 franck78 Exp $
6 eval $
(/usr
/local
/bin
/readhash CONFIG_ROOT
/ppp
/settings
)
8 # Debugging. Comment it out to stop logging
11 if [ "z$DEBUG" != "z" ] ; then
12 /usr
/bin
/logger
-t red
"BEWAN ADSL: $*"
17 function wait_for_showtime
() {
19 while [ ! $count = 45 ]; do
21 if ( /bin
/cat /proc
/net
/atm
/UNICORN
:* |
/bin
/grep -q "SHOWTIME" ); then
29 if [ "$MODEM" = "PCIST" ]; then
30 UNICORN
="unicorn_pci_atm"
32 UNICORN
="unicorn_usb_atm"
33 if [ ! -f "/proc/bus/usb/devices" ]; then
37 # commented because actually cat /proc/bus/usb/devices may trigger some verbose error until pppd session start
38 # if ( ! /bin/cat /proc/bus/usb/devices | /bin/grep -q 'Vendor=07fa' ); then
39 # msg "No ST chip : not supported by this driver"
43 # See how we were called.
46 # ActivationMode : ANSI=1,G.lite=2,MULTI=3,G.dmt=4
48 GDMT
) ActivationMode
=4 ;;
49 ANSI
) ActivationMode
=1 ;;
50 GLITE
) ActivationMode
=2 ;;
51 AUTO
) ActivationMode
=3 ;;
53 msg
"Loading $UNICORN, Modulation=$MODULATION, may take time to uncompress..."
54 /sbin
/modprobe
"$UNICORN" ActivationMode
="$ActivationMode"
56 msg
"Loading fail, is the modem plugged in?"
69 /sbin
/modprobe
-r "$UNICORN"
72 /bin
/echo "Usage: $0 {start|stop|cleanup}"