summaryrefslogtreecommitdiff
path: root/package/ppp/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-04-20 12:02:04 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-04-20 12:02:04 +0000
commit8d47f51f7c0372cc7631897ee14155849b4cb886 (patch)
treee9517a6b4b35cbe55b03dd0db929356e4b2b4b8a /package/ppp/files
parent2a386cee9926f7350c74c6d68e798b7ff21721a9 (diff)
downloadmtk-20170518-8d47f51f7c0372cc7631897ee14155849b4cb886.zip
mtk-20170518-8d47f51f7c0372cc7631897ee14155849b4cb886.tar.gz
mtk-20170518-8d47f51f7c0372cc7631897ee14155849b4cb886.tar.bz2
ppp: prevent duplicate hotplug for non uci managed ppp interfaces (#9275)
SVN-Revision: 26742
Diffstat (limited to 'package/ppp/files')
-rwxr-xr-xpackage/ppp/files/etc/ppp/ip-up9
1 files changed, 8 insertions, 1 deletions
diff --git a/package/ppp/files/etc/ppp/ip-up b/package/ppp/files/etc/ppp/ip-up
index 3895929..353f667 100755
--- a/package/ppp/files/etc/ppp/ip-up
+++ b/package/ppp/files/etc/ppp/ip-up
@@ -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/*