ppp: fix keep alive option
authorJohn Crispin <john@openwrt.org>
Tue, 1 Jul 2014 10:26:07 +0000 (10:26 +0000)
committerJohn Crispin <john@openwrt.org>
Tue, 1 Jul 2014 10:26:07 +0000 (10:26 +0000)
currently the keepalive option needs to be removed to fully disable it. this patch allows us to set it to 0.

Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 41438

package/network/services/ppp/files/ppp.sh

index 4447d061a7fe82931b16aa2b773f869366e8d671..8f4cdebcef29457debee7784b57597ea6dcf2839 100755 (executable)
@@ -32,7 +32,7 @@ ppp_generic_setup() {
        else
                demand="persist"
        fi
-
+       [ "${keepalive:-0}" -lt 1 ] && keepalive=""
        [ -n "$mtu" ] || json_get_var mtu mtu
        [ -n "$pppname" ] || pppname="${proto:-ppp}-$config"