[OpenWrt-Devel] [PATCH 1/6] ppp: cleanup fetching values for several parameters

Yousong Zhou yszhou4tech at gmail.com
Tue Sep 1 08:14:41 EDT 2015


Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 package/network/services/ppp/files/ppp.sh |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/package/network/services/ppp/files/ppp.sh b/package/network/services/ppp/files/ppp.sh
index a6389a8..b970f29 100755
--- a/package/network/services/ppp/files/ppp.sh
+++ b/package/network/services/ppp/files/ppp.sh
@@ -86,6 +86,7 @@ ppp_generic_setup() {
 	local localip
 
 	json_get_vars ipv6 demand keepalive keepalive_adaptive username password pppd_options pppname unnumbered
+	json_get_vars connect disconnect mtu
 	if [ "$ipv6" = 0 ]; then
 		ipv6=""
 	elif [ -z "$ipv6" -o "$ipv6" = auto ]; then
@@ -98,7 +99,6 @@ ppp_generic_setup() {
 	else
 		demand=""
 	fi
-	[ -n "$mtu" ] || json_get_var mtu mtu
 	[ -n "$pppname" ] || pppname="${proto:-ppp}-$config"
 	[ -n "$unnumbered" ] && {
 		local subnets
@@ -117,8 +117,6 @@ ppp_generic_setup() {
 	[ "${lcp_failure:-0}" -lt 1 ] && lcp_failure=""
 	[ "$lcp_interval" != "$keepalive" ] || lcp_interval=5
 	[ "${keepalive_adaptive:-1}" -lt 1 ] && lcp_adaptive=""
-	[ -n "$connect" ] || json_get_var connect connect
-	[ -n "$disconnect" ] || json_get_var disconnect disconnect
 
 	proto_run_command "$config" /usr/sbin/pppd \
 		nodetach ipparam "$config" \
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list