diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-09-12 00:31:37 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-09-12 00:31:37 +0000 |
commit | 1da81d312c0ca18ad48d3940acbe8dd169435a78 (patch) | |
tree | 146401ef436e93dfa84e716520f117a3b6662a23 | |
parent | b463ec4fb9e1f165190c34d7f8485a99c0f9473d (diff) |
allow the user to override the lcp echo interval in ppp network configurations
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4780 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/ppp/files/ppp.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/package/ppp/files/ppp.sh b/package/ppp/files/ppp.sh index a162b9730..e6008f40c 100644 --- a/package/ppp/files/ppp.sh +++ b/package/ppp/files/ppp.sh @@ -13,10 +13,13 @@ start_pppd() { config_get username "$cfg" username config_get password "$cfg" password config_get keepalive "$cfg" keepalive + interval="${keepalive%%*,}" + [ "$interval" != "$keepalive" ] || interval=5 + config_get demand "$cfg" demand [ -n "$demand" ] && echo "nameserver 1.1.1.1" > /tmp/resolv.conf /usr/sbin/pppd "$@" \ - ${keepalive:+lcp-echo-interval 5 lcp-echo-failure $keepalive} \ + ${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive##,*}} \ ${demand:+precompiled-active-filter /etc/ppp/filter demand idle }${demand:-persist} \ usepeerdns \ defaultroute \ |