3 # $Id: rc.eagleusbadsl,v 1.5.2.11 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
"EAGLE-USB: $*"
17 DSPstr
="Please send DSP (eaglectrl -d)"
19 # See how we were called.
22 if [ ! -f "/proc/bus/usb/devices" ]; then
27 if [ "$LINE" != "WO" -a "$LINE" != "FR" -a "$LINE" != "IT" -a "$LINE" != "ES" ]; then
28 LINE
='WO' # default CMV value
31 /bin
/ln -f -s /etc
/eagle-usb
/CMVep
$LINE.txt
/etc
/eagle-usb
/CMVep.txt
32 /bin
/ln -f -s /etc
/eagle-usb
/CMVeiWO.txt
/etc
/eagle-usb
/CMVei.txt
34 if ( /sbin
/ifconfig |
/bin
/grep -q "$IFACE" ); then
35 /sbin
/ifconfig
"$IFACE" down
37 if ( ! /sbin
/lsmod |
/bin
/grep -q [e
]agle-usb
); then
38 /sbin
/modprobe eagle-usb if_name
="$IFACE"
39 # let some time to load firmware
42 if [[ ( -e CONFIG_ROOT
/ppp
/updatesettings
) ||
43 ( `/usr/sbin/eaglestat | /bin/grep "$DSPstr"` = "$DSPstr" ) ]]; then
44 /usr
/sbin
/eaglectrl
-d -oCONFIG_ROOT/eagle-usb
/eagle-usb.conf
50 /usr
/sbin
/eaglectrl
-s90
52 msg
"synchronisation fail"
55 /sbin
/ifconfig
`/usr/sbin/eaglectrl -i` 10.0.0.139 netmask
255.255.255.254 up
66 /sbin
/ifconfig
"$IFACE" down
67 /sbin
/modprobe
-r eagle-usb
70 /bin
/echo "Usage: $0 {start|stop|cleanup}"