aboutsummaryrefslogtreecommitdiffstats
path: root/package/ppp/files
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2008-03-07 11:18:54 +0000
committerJohn Crispin <blogic@openwrt.org>2008-03-07 11:18:54 +0000
commit65f00265d25ba1236ed9091a7a675b58fe619d90 (patch)
tree1bd10e9460d85e3fb1e2b889bf2882b37fcd89a8 /package/ppp/files
parent5f2c61171077198aa1870744de34f111967658f0 (diff)
downloadupstream-65f00265d25ba1236ed9091a7a675b58fe619d90.tar.gz
upstream-65f00265d25ba1236ed9091a7a675b58fe619d90.tar.bz2
upstream-65f00265d25ba1236ed9091a7a675b58fe619d90.zip
made ppp usepeerdns configurable, fixes #3187
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10562 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/ppp/files')
-rw-r--r--package/ppp/files/ppp.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/package/ppp/files/ppp.sh b/package/ppp/files/ppp.sh
index 82fcbc8939..87872e07ae 100644
--- a/package/ppp/files/ppp.sh
+++ b/package/ppp/files/ppp.sh
@@ -38,6 +38,9 @@ start_pppd() {
interval="${keepalive##*[, ]}"
[ "$interval" != "$keepalive" ] || interval=5
+
+ config_get_bool peerdns "$cfg" peerdns 1
+ [ "$peerdns" -eq 1 ] && peerdns="usepeerdns" || peerdns=""
config_get demand "$cfg" demand
[ -n "$demand" ] && echo "nameserver 1.1.1.1" > /tmp/resolv.conf.auto
@@ -48,7 +51,7 @@ start_pppd() {
/usr/sbin/pppd "$@" \
${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}} \
${demand:+precompiled-active-filter /etc/ppp/filter demand idle }${demand:-persist} \
- usepeerdns \
+ $peerdns \
$defaultroute \
${username:+user "$username" password "$password"} \
unit "$unit" \