[backfire] merge r23530, r23531, r23551 and r25025
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 17 Jan 2011 00:21:35 +0000 (00:21 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 17 Jan 2011 00:21:35 +0000 (00:21 +0000)
SVN-Revision: 25026

package/ppp/Makefile
package/ppp/files/etc/hotplug.d/atm/20-atm-modem
package/ppp/files/pppoa.sh

index a906a114404570dd288645a267a413a040259084..6b4fe840dd647877ad2da280603093699c017b0c 100644 (file)
@@ -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/
index 45ef54239c9b0c9f60c5851eab63a9f4f9429856..4fd9b9c66224662586401e8d39f4ca6dbc085e48 100644 (file)
@@ -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
index adbcdf9fbbbcbb9a4d9b1e4982d508bb9d34cf8b..c64e809de389b6dad17b9f0dbad98b99dbfb5d51 100644 (file)
@@ -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}
 }