Changeset 257cbc3 in freewrt for package/ppp
- Timestamp:
- Jul 11, 2006, 8:21:26 AM (19 years ago)
- Branches:
- freewrt_1_0, freewrt_2_0
- Children:
- d629443
- Parents:
- 3a3b320
- Location:
- package/ppp/files
- Files:
-
- 2 edited
-
etc/ppp/options (modified) (1 diff)
-
ifup.pppoe (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
package/ppp/files/etc/ppp/options
r3a3b320 r257cbc3 4 4 nocrtscts 5 5 lock 6 maxfail 0 -
package/ppp/files/ifup.pppoe
r3a3b320 r257cbc3 1 1 #!/bin/sh 2 2 [ $# = 0 ] && { echo " $0 <group>"; exit; } 3 . /etc/ config/network3 . /etc/functions.sh 4 4 type=$1 5 5 6 eval "proto=\"\${${type}_proto}\"" 7 [ "$proto" = "pppoe" ] || { 6 [ "$(nvram get ${type}_proto)" = "pppoe" ] || { 8 7 echo "$0: ${type}_proto isn't pppoe" 9 8 exit … … 16 15 done 17 16 18 eval "IFNAME=\"\${${type}_device}\"" 19 KEEPALIVE=${ppp_redialperiod:+lcp-echo-interval $ppp_redialperiod lcp-echo-failure 5} 20 case "$ppp_demand" in 21 on|1|enabled) 22 DEMAND=${ppp_idletime:+demand idle $ppp_idletime} 23 [ -f /etc/ppp/filter ] && DEMAND=${DEMAND:+precompiled-active-filter /etc/ppp/filter $DEMAND} 24 ;; 25 *) DEMAND="persist";; 26 esac 27 MTU=${ppp_mtu:-1492} 17 (while :; do 18 IFNAME=$(nvram get wan_device) 19 USERNAME=$(nvram get ppp_username) 20 PASSWORD=$(nvram get ppp_passwd) 21 KEEPALIVE=$(nvram get ppp_redialperiod) 22 KEEPALIVE=${KEEPALIVE:+lcp-echo-failure 5 lcp-echo-interval $KEEPALIVE} 23 DEMAND=$(nvram get ppp_demand) 24 case "$DEMAND" in 25 on|1|enabled) 26 DEMAND=$(nvram get ppp_idletime) 27 DEMAND=${DEMAND:+demand idle $DEMAND} 28 [ -f /etc/ppp/filter ] && DEMAND=${DEMAND:+precompiled-active-filter /etc/ppp/filter $DEMAND} 29 ;; 30 *) DEMAND="";; 31 esac 32 33 MTU=$(nvram get ppp_mtu) 34 MTU=${MTU:-1492} 28 35 29 ifconfig $IFNAME up 30 /usr/sbin/pppd \ 31 plugin rp-pppoe.so \ 32 connect /bin/true \ 33 usepeerdns \ 34 defaultroute \ 35 linkname $type \ 36 ipparam $type \ 37 user "$ppp_username" \ 38 password "$ppp_passwd" \ 39 mtu $MTU mru $MTU \ 40 $DEMAND \ 41 $KEEPALIVE \ 42 nic-$IFNAME 43 36 ifconfig $IFNAME up 37 /usr/sbin/pppd nodetach \ 38 plugin rp-pppoe.so \ 39 connect /bin/true \ 40 usepeerdns \ 41 defaultroute \ 42 replacedefaultroute \ 43 ipparam "$type" \ 44 linkname "$type" \ 45 user "$USERNAME" \ 46 password "$PASSWORD" \ 47 mtu $MTU \ 48 mru $MTU \ 49 $DEMAND \ 50 $KEEPALIVE \ 51 nic-$IFNAME 52 done 2>&1 >/dev/null ) &
Note:
See TracChangeset
for help on using the changeset viewer.
