comgt: fix directip auth type
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 26 Sep 2014 15:55:45 +0000 (15:55 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 26 Sep 2014 15:55:45 +0000 (15:55 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42671 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/network/utils/comgt/files/directip.sh

index 2bfdf80..b860f1e 100644 (file)
@@ -56,9 +56,9 @@ proto_directip_setup() {
        gcom -d "$device" -s /etc/gcom/getcarrier.gcom || return 1
 
        local auth_type=0
-       [ -z "$auth" ] && case $auth in
+       case $auth in
        pap) auth_type=1;;
-       chap) auth_type=1;;
+       chap) auth_type=2;;
        esac
 
        USE_APN="$apn" USE_USER="$username" USE_PASS="$password" USE_AUTH="$auth_type" \