Fixing some gobi bugs. There are still corner cases. - conn - A script repository to manage connections in Linux.
       
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit ff8bccac39aa455088811dea6cfd4d05d42c73d8
 (DIR) parent 6b4bb81a6429da381cfc5c7d50904968804b4a0f
 (HTM) Author: Christoph Lohmann <20h@r-36.net>
       Date:   Tue,  5 Apr 2011 15:02:15 +0200
       
       Fixing some gobi bugs. There are still corner cases.
       
       Diffstat:
         examples/wwan/gobi-x201-init        |       3 +++
         examples/wwan/ppp0-run.sh           |       6 ++++++
       
       2 files changed, 9 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/examples/wwan/gobi-x201-init b/examples/wwan/gobi-x201-init
       @@ -43,6 +43,8 @@ case "$1" in
                        sleep 5
                        chat -t 2 -v "" "AT+CFUN=1" "OK" > $CONTROL_DEVICE \
                                < $CONTROL_DEVICE
       +                [ ! $? -eq 0 ] && exit 1 
       +
                        if [ -n "$PIN" ];
                        then
                                echo -n "PIN..."
       @@ -55,6 +57,7 @@ case "$1" in
                                "AT+CGDCONT=1,\"IP\",\"$APN\"" "OK" \
                                "ATDT${NUMBER}" "CONNECT" \
                                > $CONTROL_DEVICE < $CONTROL_DEVICE
       +                [ ! $? -eq 0 ] && exit 1
                        echo "done"
        
                        echo -n "Starting pppd ..."
 (DIR) diff --git a/examples/wwan/ppp0-run.sh b/examples/wwan/ppp0-run.sh
       @@ -7,6 +7,12 @@ interface=`getinterface $0`
        case "$1" in
                -s)
                        ${WWANDIR}/gobi-x201-init -s
       +                if [ ! $? -eq 0 ];
       +                then
       +                        echo "Starting gobi failed. See syslog for errors."
       +                        exit 1
       +                fi
       +
                        echo -n "Waiting for ppp0 to be online ..."
                        while [ "`ip addr show dev $interface | grep inet`" == "" ];
                        do