X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/cc18fba62bb2b8ea02d0faa13a04724d24a5f958..d79c90eb6e52cec0d9e1d3be83ffc8392733c322:/openwrt/package/ppp/ipkg/ppp-pppoe-plugin/etc/init.d/S50pppoe diff --git a/openwrt/package/ppp/ipkg/ppp-pppoe-plugin/etc/init.d/S50pppoe b/openwrt/package/ppp/ipkg/ppp-pppoe-plugin/etc/init.d/S50pppoe index 5d6ca5f3a..33143c915 100755 --- a/openwrt/package/ppp/ipkg/ppp-pppoe-plugin/etc/init.d/S50pppoe +++ b/openwrt/package/ppp/ipkg/ppp-pppoe-plugin/etc/init.d/S50pppoe @@ -9,19 +9,20 @@ for module in slhc ppp_generic pppox pppoe; do /sbin/insmod $module 2>/dev/null >/dev/null done -IFNAME=$(nvram get pppoe_ifname) -USERNAME=$(nvram get ppp_username) -PASSWORD=$(nvram get ppp_passwd) -REDIAL=$(nvram get ppp_redialperiod) -REDIAL=${REDIAL:+holdoff $REDIAL} -IDLETIME=$(nvram get ppp_idletime) -IDLETIME=${IDLETIME:+idle $IDLETIME} -MTU=$(nvram get ppp_mtu) - -ifconfig $IFNAME up -echo -e "plugin rp-pppoe.so\nconnect /bin/true\nusepeerdns\ndefaultroute\nuser \"$USERNAME\"\npassword \"$PASSWORD\"\nmtu $MTU\n$IDLETIME\n$REDIAL" > /tmp/.pppoe-data ( while true; do + IFNAME=$(nvram get pppoe_ifname) + USERNAME=$(nvram get ppp_username) + PASSWORD=$(nvram get ppp_passwd) + REDIAL=$(nvram get ppp_redialperiod) + REDIAL=${REDIAL:+holdoff $REDIAL} + IDLETIME=$(nvram get ppp_idletime) + IDLETIME=${IDLETIME:+idle $IDLETIME} + MTU=$(nvram get ppp_mtu) + MTU=${MTU:+ mtu $MTU mru $MTU} + + ifconfig $IFNAME up + echo -e "plugin rp-pppoe.so\npersist\nconnect /bin/true\nusepeerdns\ndefaultroute\nuser \"$USERNAME\"\npassword \"$PASSWORD\"\n$MTU\n$IDLETIME\n$REDIAL" > /tmp/.pppoe-data /usr/sbin/pppd nodetach file /tmp/.pppoe-data $IFNAME done ) &