aboutsummaryrefslogtreecommitdiffstats
path: root/package/ppp/files/etc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-05-07 01:22:48 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-05-07 01:22:48 +0000
commit4c686abd91aab45c07b75063be2a081e7f8cec38 (patch)
tree9441db39cb28cdf7f5634ffc9261adc38f9ab85c /package/ppp/files/etc
parent58cc0f2aceaa138174e6da26cd2ecc2a1fa3b66c (diff)
downloadupstream-4c686abd91aab45c07b75063be2a081e7f8cec38.tar.gz
upstream-4c686abd91aab45c07b75063be2a081e7f8cec38.tar.bz2
upstream-4c686abd91aab45c07b75063be2a081e7f8cec38.zip
[package] ppp:
- don't let pppd control resolv.conf.auto because it will wipe foreign dns entries - handle dns setup in ip-up handler - use add_dns() and remove_dns() to only add/remove dns entries related to the corresponding pppd instance - make pppd shutdown work for interfaces without ifname option, e.g. pptp git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21392 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/ppp/files/etc')
-rwxr-xr-xpackage/ppp/files/etc/ppp/ip-up6
1 files changed, 5 insertions, 1 deletions
diff --git a/package/ppp/files/etc/ppp/ip-up b/package/ppp/files/etc/ppp/ip-up
index 4b44b25d0b..3895929539 100755
--- a/package/ppp/files/etc/ppp/ip-up
+++ b/package/ppp/files/etc/ppp/ip-up
@@ -1,5 +1,8 @@
#!/bin/sh
+
. /etc/functions.sh
+. /lib/network/config.sh
+
PPP_IFACE="$1"
PPP_TTY="$2"
PPP_SPEED="$3"
@@ -14,8 +17,9 @@ export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
uci_set_state network "$PPP_IPPARAM" gateway "$PPP_REMOTE"
local dns="$DNS1${DNS2:+ $DNS2}"
- [ -n "$dns" ] && uci_set_state network "$PPP_IPPARAM" dns "$dns"
+ [ -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"
[ -d /etc/ppp/ip-up.d ] && {