From b9074255fc05538ddcc0b07ebd9c4af2fbb93889 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 17 Jan 2011 00:21:35 +0000 Subject: [PATCH] [backfire] merge r23530, r23531, r23551 and r25025 SVN-Revision: 25026 --- package/ppp/Makefile | 2 +- .../ppp/files/etc/hotplug.d/atm/20-atm-modem | 5 ++++- package/ppp/files/pppoa.sh | 18 ++++++++++++------ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/package/ppp/Makefile b/package/ppp/Makefile index a906a11440..6b4fe840dd 100644 --- a/package/ppp/Makefile +++ b/package/ppp/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ppp PKG_VERSION:=2.4.4 -PKG_RELEASE:=11 +PKG_RELEASE:=14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/ diff --git a/package/ppp/files/etc/hotplug.d/atm/20-atm-modem b/package/ppp/files/etc/hotplug.d/atm/20-atm-modem index 45ef54239c..4fd9b9c662 100644 --- a/package/ppp/files/etc/hotplug.d/atm/20-atm-modem +++ b/package/ppp/files/etc/hotplug.d/atm/20-atm-modem @@ -10,10 +10,13 @@ if [ "$ACTION" = "add" ]; then local up config_get_bool up "$ifc" up 0 + local auto + config_get_bool auto "$ifc" auto 1 + local proto config_get proto "$ifc" proto - if [ "$proto" = "pppoa" ] && [ "$up" != 1 ]; then + if [ "$proto" = "pppoa" ] && [ "$up" != 1 ] && [ "$auto" = 1 ]; then found=1 ( sleep 1; ifup "$ifc" ) & fi diff --git a/package/ppp/files/pppoa.sh b/package/ppp/files/pppoa.sh index adbcdf9fbb..c64e809de3 100644 --- a/package/ppp/files/pppoa.sh +++ b/package/ppp/files/pppoa.sh @@ -1,13 +1,20 @@ +scan_pppoa() { + config_set "$1" device "pppoa-$1" +} + +coldplug_interface_pppoa() { + setup_interface_pppoa x "$1" +} + stop_interface_pppoa() { stop_interface_ppp "$1" } setup_interface_pppoa() { - local iface="$1" local config="$2" - local device - config_get device "$config" device + local atmdev + config_get atmdev "$config" atmdev local vpi config_get vpi "$config" vpi @@ -29,9 +36,8 @@ setup_interface_pppoa() { local mtu config_get mtu "$config" mtu - mtu=${mtu:-1500} start_pppd "$config" \ - plugin pppoatm.so ${vpi:-8}.${vci:-35} ${encaps} \ - mtu $mtu mru $mtu + plugin pppoatm.so ${atmdev:+$atmdev.}${vpi:-8}.${vci:-35} \ + ${encaps} ${mtu:+mtu $mtu mru $mtu} } -- 2.30.2