From: blogic Date: Mon, 25 Nov 2013 14:09:16 +0000 (+0000) Subject: pppd: Place plugin-specific options after `plugin name`. X-Git-Tag: fast2504n-3.10.28-merged~660 X-Git-Url: https://git.enpas.org/?a=commitdiff_plain;h=5e1e1087e213397f67ca3e127125b4e576b8bed4;p=openwrt.git pppd: Place plugin-specific options after `plugin name`. Before this patch, if we specify a plugin specific option through `pppd_options` in /etc/config/network, e.g. `rp_pppoe_verbose 1`, pppd would quit with the following error in log. Wed Oct 9 09:42:58 2013 daemon.notice netifd: GORG (1689): /usr/sbin/pppd: unrecognized option 'rp_pppoe_verbose' Wed Oct 9 09:42:58 2013 daemon.err pppd[1689]: unrecognized option 'rp_pppoe_verbose' Wed Oct 9 09:42:58 2013 daemon.notice netifd: GORG (1689): pppd version 2.4.5 Wed Oct 9 09:42:58 2013 daemon.notice netifd: GORG (1689): Usage: /usr/sbin/pppd [ options ], where options are: This is due to the requirement that function add_option() should be called by the plugin_init() function first before pppd can parse those options. Signed-off-by: Yousong Zhou git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38911 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/package/network/services/ppp/files/ppp.sh b/package/network/services/ppp/files/ppp.sh index 02b40558ca..284d44cfed 100755 --- a/package/network/services/ppp/files/ppp.sh +++ b/package/network/services/ppp/files/ppp.sh @@ -55,7 +55,7 @@ ppp_generic_setup() { ip-down-script /lib/netifd/ppp-down \ ipv6-down-script /lib/netifd/ppp-down \ ${mtu:+mtu $mtu mru $mtu} \ - $pppd_options "$@" + "$@" $pppd_options } ppp_generic_teardown() {