From 5659ec69182f34d66f59df41a55b4f6415a1e07d Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 4 Oct 2011 23:10:36 +0000 Subject: ppp: add workaround for ignored rp_pppoe_ac and rp_pppoe_service options by appending the nic-xxx argument last SVN-Revision: 28364 --- package/ppp/files/ppp.sh | 10 +++++++++- package/ppp/files/pppoe.sh | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'package/ppp/files') diff --git a/package/ppp/files/ppp.sh b/package/ppp/files/ppp.sh index 996d542..7c789fc 100644 --- a/package/ppp/files/ppp.sh +++ b/package/ppp/files/ppp.sh @@ -16,6 +16,13 @@ stop_interface_ppp() { start_pppd() { local cfg="$1"; shift + # Workaround for PPPoE service and AC name options, + # filter out the nic-* argument and append it as last option + local nic="" + case "$1" in + nic-*) nic="$1"; shift ;; + esac + local proto config_get proto "$cfg" proto @@ -110,7 +117,8 @@ start_pppd() { ${disconnect:+disconnect "$disconnect"} \ ${ipv6} \ ${pppd_options} \ - nodetach + nodetach \ + ${nic} lock -u "/var/lock/ppp-${link}" } diff --git a/package/ppp/files/pppoe.sh b/package/ppp/files/pppoe.sh index bbd36a1..99409f3 100644 --- a/package/ppp/files/pppoe.sh +++ b/package/ppp/files/pppoe.sh @@ -13,7 +13,7 @@ setup_interface_pppoe() { config_get mtu "$config" mtu mtu=${mtu:-1492} start_pppd "$config" \ + "nic-$iface" \ plugin rp-pppoe.so \ - mtu $mtu mru $mtu \ - "nic-$iface" + mtu $mtu mru $mtu } -- cgit v1.1