fix typo
[openwrt.git] / package / ppp / files / ppp.sh
1 scan_ppp() {
2 config_get ifname "$1" ifname
3 pppdev="${pppdev:-0}"
4 config_set "$1" device "$ifname"
5 config_set "$1" ifname "ppp$pppdev"
6 config_set "$1" unit "$pppdev"
7 }
8
9 start_pppd() {
10 local cfg="$1"; shift
11 config_get device "$cfg" device
12 config_get unit "$cfg" unit
13 config_get username "$cfg" username
14 config_get password "$cfg" password
15 config_get keepalive "$cfg" keepalive
16 config_get demand "$cfg" demand
17 [ -n "$demand" ] && echo "nameserver 1.1.1.1" > /tmp/resolv.conf
18 /usr/sbin/pppd "$@" \
19 ${keepalive:+lcp-echo-interval 5 lcp-echo-failure $keepalive} \
20 ${demand:+precompiled-active-filter /etc/ppp/filter demand idle }${demand:-persist} \
21 usepeerdns \
22 defaultroute \
23 replacedefaultroute \
24 ${username:+user "$username" password "$password"} \
25 linkname "$cfg" \
26 ipparam "$cfg"
27 }
This page took 0.04325 seconds and 5 git commands to generate.