aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2008-03-07 11:18:54 +0000
committerJohn Crispin <john@openwrt.org>2008-03-07 11:18:54 +0000
commit18e061bd2a48016730d2f03e3ecde12024715a06 (patch)
tree5b830da592e471e21c9f2671cc36975552e13640
parentf5708f236947a7d1bb1cf53b6f4e1c3701355aee (diff)
downloadupstream-18e061bd2a48016730d2f03e3ecde12024715a06.tar.gz
upstream-18e061bd2a48016730d2f03e3ecde12024715a06.tar.bz2
upstream-18e061bd2a48016730d2f03e3ecde12024715a06.zip
made ppp usepeerdns configurable, fixes #3187
SVN-Revision: 10562
-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" \