allow the user to disable the defaultroute option for ppp
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 1 Sep 2007 12:57:15 +0000 (12:57 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 1 Sep 2007 12:57:15 +0000 (12:57 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8569 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/ppp/files/ppp.sh

index 63d8cc4..9f50e85 100644 (file)
@@ -26,6 +26,8 @@ start_pppd() {
        config_get connect "$cfg" connect
        config_get disconnect "$cfg" disconnect
        config_get pppd_options "$cfg" pppd_options
+       config_get_bool defaultroute "$cfg" defaultroute 1
+       [ "$defaultroute" -eq 1 ] && defaultroute="defaultroute replacedefaultroute" || defaultroute=""
 
        interval="${keepalive##*[, ]}"
        [ "$interval" != "$keepalive" ] || interval=5
@@ -36,8 +38,7 @@ start_pppd() {
                ${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}} \
                ${demand:+precompiled-active-filter /etc/ppp/filter demand idle }${demand:-persist} \
                usepeerdns \
-               defaultroute \
-               replacedefaultroute \
+               $defaultroute \
                ${username:+user "$username" password "$password"} \
                unit "$unit" \
                linkname "$cfg" \
This page took 0.025634 seconds and 4 git commands to generate.