uqmi: fix option ipv6
[openwrt/staging/mkresin.git] / package / network / utils / uqmi / files / lib / netifd / proto / qmi.sh
old mode 100644 (file)
new mode 100755 (executable)
index 8ee7dbd..6dcc226
@@ -31,11 +31,7 @@ proto_qmi_setup() {
 
        ipv4=1
 
-       if [ "$ipv6" = 0 ]; then
-               ipv6=""
-       else
-               ipv6=1
-       fi
+       [ "$ipv6" = 1 ] || ipv6=""
 
        [ -n "$ctl_device" ] && device=$ctl_device
 
@@ -140,7 +136,7 @@ proto_qmi_setup() {
                return 1
        }
 
-       if [ -z "$dhcp" ]; then
+       if [ -z "$dhcp" -o "$dhcp" = 0 ]; then
                echo "Setting up $ifname"
                [ -n "$ipv4" ] && {
                        json_load "$(uqmi -s -d $device --set-client-id wds,$cid_4 --get-current-settings)"