Revision: 5938
          http://ipcop.svn.sourceforge.net/ipcop/?rev=5938&view=rev
Author:   owes
Date:     2011-10-14 11:13:39 +0000 (Fri, 14 Oct 2011)
Log Message:
-----------
More modifications for eagle USB. Still broken though and not easy to fix 
without hardware.

Modified Paths:
--------------
    ipcop/trunk/src/rc.d/rc.eagleusbadsl
    ipcop/trunk/src/rc.d/rc.red
    ipcop/trunk/updates/2.0.1/ROOTFILES.i486-2.0.1

Modified: ipcop/trunk/src/rc.d/rc.eagleusbadsl
===================================================================
--- ipcop/trunk/src/rc.d/rc.eagleusbadsl        2011-10-14 06:53:42 UTC (rev 
5937)
+++ ipcop/trunk/src/rc.d/rc.eagleusbadsl        2011-10-14 11:13:39 UTC (rev 
5938)
@@ -27,7 +27,7 @@
 DEBUG="on"
 
 msg() {
-    if [ "$DEBUG" -eq "on" ] ; then
+    if [ "$DEBUG" = "on" ] ; then
         /usr/bin/logger -t red "EAGLE-USB: $*"
     fi
     echo "$*"
@@ -52,45 +52,61 @@
         exit 1
     fi
 
-    if [ "$LINE" != "WO" -a "$LINE" != "FR" -a "$LINE" != "IT" -a "$LINE" != 
"ES" ]; then
-        LINE='WO' # default CMV value
-    fi
+    # TODO: unsure how to best handle this section
+#    if [ "$LINE" != "WO" -a "$LINE" != "FR" -a "$LINE" != "IT" -a "$LINE" != 
"ES" ]; then
+#        LINE='WO' # default CMV value
+#    fi
 
-    /bin/ln -f -s /etc/eagle-usb/CMVep$LINE.txt /etc/eagle-usb/CMVep.txt
-    /bin/ln -f -s /etc/eagle-usb/CMVeiWO.txt /etc/eagle-usb/CMVei.txt
+#    /bin/ln -f -s /etc/eagle-usb/CMVep$LINE.txt /etc/eagle-usb/CMVep.txt
+#    /bin/ln -f -s /etc/eagle-usb/CMVeiWO.txt /etc/eagle-usb/CMVei.txt
 
-    /sbin/ip link set "$IFACE" down 2>/dev/null
-    if ( ! /bin/lsmod | /bin/grep -q [e]agle-usb ); then
-        /sbin/modprobe eagle-usb if_name="$IFACE"
+    # TODO: I don't think we need do this for ueagle-atm
+#    /sbin/ip link set "$IFACE" down 2>/dev/null
+
+    if ( ! /bin/lsmod | /bin/grep -q [u]eagle-atm ); then
+        /sbin/modprobe ueagle-atm
         # let some time to load firmware
         /bin/sleep 8
     fi
-    if [[ ( -e /var/ipcop/ppp/updatesettings) ||
-            ( `/usr/sbin/eaglestat | /bin/grep "$DSPstr"` = "$DSPstr" ) ]]; 
then
-        /usr/sbin/eaglectrl -d -o/var/ipcop/eagle-usb/eagle-usb.conf
-        if [ $? -ne 0 ]; then
-            msg "init fail"
-            exit 1
-        fi
-    fi
-    /usr/sbin/eaglectrl -s90
-    if [ $? -ne 0 ]; then
-        msg "synchronisation fail"
+
+    if [ ! -d "/sys/bus/usb/drivers/ueagle-atm" ]; then
+        msg "ueagle-atm isn't loaded"
         exit 1
     fi
-    /sbin/ifconfig `/usr/sbin/eaglectrl -i` 10.0.0.139 netmask 255.255.255.254 
up
-    if [ $? -ne 0 ]; then
-        msg "ifconfig fail"
-        exit 1
-    fi
+
+    # TODO: unsure how to best handle this section
+#    if [[ ( -e /var/ipcop/ppp/updatesettings) ||
+#            ( `/usr/sbin/eaglestat | /bin/grep "$DSPstr"` = "$DSPstr" ) ]]; 
then
+#        /usr/sbin/eaglectrl -d -o/var/ipcop/eagle-usb/eagle-usb.conf
+#        if [ $? -ne 0 ]; then
+#            msg "init fail"
+#            exit 1
+#        fi
+#    fi
+
+    # TODO: unsure how to best handle this section
+#    /usr/sbin/eaglectrl -s90
+#    if [ $? -ne 0 ]; then
+#        msg "synchronisation fail"
+#        exit 1
+#    fi
+
+    # TODO: do we need something like this?
+#    /sbin/ifconfig `/usr/sbin/eaglectrl -i` 10.0.0.139 netmask 
255.255.255.254 up
+#    if [ $? -ne 0 ]; then
+#        msg "ifconfig fail"
+#        exit 1
+#    fi
     ;;
 stop)
     msg "stop"
     ;;
 cleanup)
     msg "driver cleanup"
-    /sbin/ip link set "$IFACE" down
-    /sbin/modprobe -r eagle-usb
+    # TODO: do we need something like this?
+#    /sbin/ip link set "$IFACE" down
+
+    /sbin/modprobe -r ueagle-atm
     ;;
 *)
     /bin/echo "Usage: $0 {start|stop|cleanup}"

Modified: ipcop/trunk/src/rc.d/rc.red
===================================================================
--- ipcop/trunk/src/rc.d/rc.red 2011-10-14 06:53:42 UTC (rev 5937)
+++ ipcop/trunk/src/rc.d/rc.red 2011-10-14 11:13:39 UTC (rev 5938)
@@ -969,6 +969,14 @@
         &General::log("ERROR: EAGLE-USB ADSL MODEM failed to start");
         exit 1;
     }
+
+    # I'm guessing here, but documentation suggests to use br2684ctl etc.
+    # pretty much looks similar to what we do in doatmdial
+    # http://atm.eagle-usb.org/wakka.php?wiki=UeagleAtmDoc
+    doatmdial();
+    return;
+
+    # TODO: the OLD stuff, probably no longer needed
     $iface = `/usr/sbin/eaglectrl -i 2>/dev/null | /usr/bin/tr -d '\012'`;
     $iface = &General::getinterface($iface);
 

Modified: ipcop/trunk/updates/2.0.1/ROOTFILES.i486-2.0.1
===================================================================
--- ipcop/trunk/updates/2.0.1/ROOTFILES.i486-2.0.1      2011-10-14 06:53:42 UTC 
(rev 5937)
+++ ipcop/trunk/updates/2.0.1/ROOTFILES.i486-2.0.1      2011-10-14 11:13:39 UTC 
(rev 5938)
@@ -1,6 +1,7 @@
 ## please place IPCop files first, then packages sorted by alphabetical order
 /etc/rc.d/rc.eagleusbadsl
 /etc/rc.d/rc.pulsardsl
+/etc/rc.d/rc.red
 /home/httpd/cgi-bin/email.cgi
 /home/httpd/cgi-bin/index.cgi
 /home/httpd/cgi-bin/logsummary.cgi

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn

Reply via email to