[package] ppp: pass "nodefaultroute" if defaultroute is 0, don't unconditionally...
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 5 May 2010 01:48:45 +0000 (01:48 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 5 May 2010 01:48:45 +0000 (01:48 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21361 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/ppp/files/ppp.sh

index 6905113..bc18d1e 100644 (file)
@@ -59,7 +59,7 @@ start_pppd() {
        local defaultroute
        config_get_bool defaultroute "$cfg" defaultroute 1
        [ "$defaultroute" -eq 1 ] && \
        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
 
        local interval="${keepalive##*[, ]}"
        [ "$interval" != "$keepalive" ] || interval=5
@@ -77,7 +77,9 @@ start_pppd() {
        local peerdns
        config_get_bool peerdns "$cfg" peerdns $peer_default
 
        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"
 
        [ "$peerdns" -eq 1 ] && {
                peerdns="usepeerdns"
This page took 0.025275 seconds and 4 git commands to generate.