ppp: extend the r26742 change to ip-down too
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 20 Apr 2011 12:08:12 +0000 (12:08 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 20 Apr 2011 12:08:12 +0000 (12:08 +0000)
SVN-Revision: 26743

package/ppp/files/etc/ppp/ip-down

index f26cf4db03668f781b0aed1487c3240152e52409..487ff6b46b18641ee297140a8163cec147a63771 100755 (executable)
@@ -8,10 +8,13 @@ PPP_REMOTE="$5"
 PPP_IPPARAM="$(echo $6 | sed 's/\./_/g')"
 export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
 [ -z "$PPP_IPPARAM" ] || {
-       env -i ACTION="ifdown" INTERFACE="$PPP_IPPARAM" DEVICE="$PPP_IFACE" PROTO=ppp /sbin/hotplug-call "iface"
-
-       # remove the interface's network state
-       uci_revert_state network "$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="ifdown" INTERFACE="$PPP_IPPARAM" DEVICE="$PPP_IFACE" PROTO=ppp /sbin/hotplug-call "iface"
+                       uci_revert_state network "$PPP_IPPARAM"
+               ;;
+       esac
 }
 
 [ -d /etc/ppp/ip-down.d ] && {