switch on new verbose system
[openwrt.git] / package / ppp / files / ifup.pppoa
1 #!/bin/sh
2 [ $# = 0 ] && { echo " $0 <group>"; exit; }
3 . /etc/config/network
4 type=$1
5
6 eval "proto=\"\${${type}_proto}\""
7 [ "$proto" = "pppoa" ] || {
8 echo "$0: ${type}_proto isn't pppoa"
9 exit
10 }
11
12 mkdir -p /var/lock
13
14 for module in slhc ppp_generic pppoatm; do
15 /sbin/insmod $module 2>&- >&-
16 done
17
18 KEEPALIVE=${ppp_redialperiod:+lcp-echo-interval $ppp_redialperiod lcp-echo-failure 5}
19 case "$ppp_demand" in
20 on|1|enabled)
21 DEMAND=${ppp_idletime:+demand idle $ppp_idletime}
22 [ -f /etc/ppp/filter ] && DEMAND=${DEMAND:+precompiled-active-filter /etc/ppp/filter $DEMAND}
23 ;;
24 *) DEMAND="persist";;
25 esac
26 MTU=${ppp_mtu:-1500}
27
28 /usr/sbin/pppd \
29 plugin pppoatm.so ${atm_vpi:-8}.${atm_vci:-35} \
30 usepeerdns \
31 defaultroute \
32 linkname $type \
33 ipparam $type \
34 user "$ppp_username" \
35 password "$ppp_passwd" \
36 mtu $MTU mru $MTU \
37 $DEMAND \
38 $KEEPALIVE
This page took 0.053416 seconds and 5 git commands to generate.