ppp: prevent duplicate hotplug for non uci managed ppp interfaces (#9275)
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 20 Apr 2011 12:02:04 +0000 (12:02 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 20 Apr 2011 12:02:04 +0000 (12:02 +0000)
SVN-Revision: 26742

package/ppp/Makefile
package/ppp/files/etc/ppp/ip-up

index 992d966497581cb61f6d9b38af3844256df27cae..3aefed3142a55d795111f0ee19072cad48533df5 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ppp
 PKG_VERSION:=2.4.4
-PKG_RELEASE:=16
+PKG_RELEASE:=17
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
index 38959295394bd811d499e99044202726ba5cbd9c..353f667895ed7bda73e45c0193612a4f3768693a 100755 (executable)
@@ -20,7 +20,14 @@ export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
        [ -n "$dns" ] && add_dns "$PPP_IPPARAM" $dns
 }
 
-[ -z "$PPP_IPPARAM" ] || env -i ACTION="ifup" INTERFACE="$PPP_IPPARAM" DEVICE="$PPP_IFACE" PROTO=ppp /sbin/hotplug-call "iface"
+[ -z "$PPP_IPPARAM" ] || {
+       case "$PPP_IFACE" in
+               # only handle uci managed interfaces here, others are done by generic hotplug
+               3g-*|ppp-*|pppoa-*|pppoe-*|pptp-*)
+                       env -i ACTION="ifup" INTERFACE="$PPP_IPPARAM" DEVICE="$PPP_IFACE" PROTO=ppp /sbin/hotplug-call "iface"
+               ;;
+       esac
+}
 
 [ -d /etc/ppp/ip-up.d ] && {
        for SCRIPT in /etc/ppp/ip-up.d/*