diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-05-05 01:48:45 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-05-05 01:48:45 +0000 |
commit | 1564e6fa9fa6e53ec41b0927954b0f30a038165c (patch) | |
tree | 6cabcf01e27f3cf519aec850aa24886e5e7e550d /package/ppp/files/ppp.sh | |
parent | 5c30b827f2562d6cab58ddf3506e5296dedaf223 (diff) | |
download | master-187ad058-1564e6fa9fa6e53ec41b0927954b0f30a038165c.tar.gz master-187ad058-1564e6fa9fa6e53ec41b0927954b0f30a038165c.tar.bz2 master-187ad058-1564e6fa9fa6e53ec41b0927954b0f30a038165c.zip |
[package] ppp: pass "nodefaultroute" if defaultroute is 0, don't unconditionally truncate resolv.conf, thanks cshore
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21361 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/ppp/files/ppp.sh')
-rw-r--r-- | package/ppp/files/ppp.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/package/ppp/files/ppp.sh b/package/ppp/files/ppp.sh index 69051132ed..bc18d1ec9a 100644 --- a/package/ppp/files/ppp.sh +++ b/package/ppp/files/ppp.sh @@ -59,7 +59,7 @@ start_pppd() { local defaultroute config_get_bool defaultroute "$cfg" defaultroute 1 [ "$defaultroute" -eq 1 ] && \ - defaultroute="defaultroute replacedefaultroute" || defaultroute="" + defaultroute="defaultroute replacedefaultroute" || defaultroute="nodefaultroute" local interval="${keepalive##*[, ]}" [ "$interval" != "$keepalive" ] || interval=5 @@ -77,7 +77,9 @@ start_pppd() { local peerdns config_get_bool peerdns "$cfg" peerdns $peer_default - echo -n "" > /tmp/resolv.conf.auto + if [ "$peerdns" -eq 1 ] || [ ! -e /tmp/resolv.conf.auto ]; then + echo -n "" > /tmp/resolv.conf.auto + fi [ "$peerdns" -eq 1 ] && { peerdns="usepeerdns" |