$(INSTALL_DIR) $(1)/etc/ppp/ip-up.d
$(INSTALL_BIN) ./files/etc/ppp/ip-down $(1)/etc/ppp/
$(INSTALL_DIR) $(1)/etc/ppp/ip-down.d
$(INSTALL_DIR) $(1)/etc/ppp/ip-up.d
$(INSTALL_BIN) ./files/etc/ppp/ip-down $(1)/etc/ppp/
$(INSTALL_DIR) $(1)/etc/ppp/ip-down.d
+ $(INSTALL_BIN) ./files/etc/ppp/ipv6-up $(1)/etc/ppp/
+ $(INSTALL_BIN) ./files/etc/ppp/ipv6-down $(1)/etc/ppp/
$(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
ln -sf /tmp/resolv.conf.auto $(1)/etc/ppp/resolv.conf
endef
$(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
ln -sf /tmp/resolv.conf.auto $(1)/etc/ppp/resolv.conf
endef
-route -A inet6 del $4 dev $1
+
+gw=$4
+dev=$1
+cfg=$6
+
+. /etc/functions.sh # common functions
+include /lib/network # include /lib/network/*.sh
+scan_interfaces # read and parse the network config
+
+config_get_bool defaultroute "$cfg" defaultroute 1
+
+if [ ${defaultroute} -eq 1 ]
+then
+ route -A inet6 del default gw ${gw} dev ${dev}
+fi
-route -A inet6 add default $4 dev $1
+
+gw=$4
+dev=$1
+cfg=$6
+
+. /etc/functions.sh # common functions
+include /lib/network # include /lib/network/*.sh
+scan_interfaces # read and parse the network config
+
+config_get_bool defaultroute "$cfg" defaultroute 1
+
+if [ ${defaultroute} -eq 1 ]
+then
+ route -A inet6 add default gw ${gw} dev ${dev}
+fi
config_get demand "$cfg" demand
[ -n "$demand" ] && echo "nameserver 1.1.1.1" > /tmp/resolv.conf.auto
config_get demand "$cfg" demand
[ -n "$demand" ] && echo "nameserver 1.1.1.1" > /tmp/resolv.conf.auto
+
+ config_get_bool ipv6 "$cfg" ipv6 0
+ [ "$ipv6" -eq 1 ] && ipv6="+ipv6" || ipv6=""
+
/usr/sbin/pppd "$@" \
${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}} \
${demand:+precompiled-active-filter /etc/ppp/filter demand idle }${demand:-persist} \
/usr/sbin/pppd "$@" \
${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}} \
${demand:+precompiled-active-filter /etc/ppp/filter demand idle }${demand:-persist} \
ipparam "$cfg" \
${connect:+connect "$connect"} \
${disconnect:+disconnect "$disconnect"} \
ipparam "$cfg" \
${connect:+connect "$connect"} \
${disconnect:+disconnect "$disconnect"} \
${pppd_options}
lock -u "/var/lock/ppp-${cfg}"
${pppd_options}
lock -u "/var/lock/ppp-${cfg}"