2 config_get ifname
"$1" ifname
4 config_set
"$1" ifname
"ppp$pppdev"
5 config_set
"$1" unit
"$pppdev"
11 # make sure only one pppd process is started
12 lock
"/var/lock/ppp-${cfg}"
13 local pid
="$(head -n1 /var/run/ppp-${cfg}.pid 2>/dev/null)"
14 [ -d "/proc/$pid" ] && grep pppd
"/proc/$pid/cmdline" 2>/dev
/null
>/dev
/null
&& {
15 lock
-u "/var/lock/ppp-${cfg}"
19 config_get device
"$cfg" device
20 config_get unit
"$cfg" unit
21 config_get username
"$cfg" username
22 config_get password
"$cfg" password
23 config_get keepalive
"$cfg" keepalive
24 interval
="${keepalive##*[, ]}"
25 [ "$interval" != "$keepalive" ] || interval
=5
27 config_get demand
"$cfg" demand
28 [ -n "$demand" ] && echo "nameserver 1.1.1.1" > /tmp
/resolv.conf.auto
30 ${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}} \
31 ${demand:+precompiled-active-filter /etc/ppp/filter demand idle }${demand:-persist} \
35 ${username:+user "$username" password "$password"} \
39 lock
-u "/var/lock/ppp-${cfg}"
This page took 0.045086 seconds and 5 git commands to generate.