Lines 101-106
Link Here
|
101 |
# |
101 |
# |
102 |
# Returns 0 (true) when successful, otherwise 1 |
102 |
# Returns 0 (true) when successful, otherwise 1 |
103 |
pppd_start() { |
103 |
pppd_start() { |
|
|
104 |
${IN_BACKGROUND} && return 0 |
105 |
|
104 |
local iface="$1" ifvar=$( bash_variable "$1" ) opts="" link |
106 |
local iface="$1" ifvar=$( bash_variable "$1" ) opts="" link |
105 |
if [[ ${iface%%[0-9]*} != "ppp" ]]; then |
107 |
if [[ ${iface%%[0-9]*} != "ppp" ]]; then |
106 |
eerror "PPP can only be invoked from net.ppp[0-9]" |
108 |
eerror "PPP can only be invoked from net.ppp[0-9]" |
Lines 225-230
Link Here
|
225 |
|
227 |
|
226 |
insert_link_in_opts=0 |
228 |
insert_link_in_opts=0 |
227 |
fi |
229 |
fi |
|
|
230 |
if [[ " ${opts} " == *" plugin pppoatm.so "* ]]; then |
231 |
# Load the pppoa kernel module - if this fails, we have to hope |
232 |
# that pppoa support is compiled into the kernel |
233 |
modprobe pppoatm 2>/dev/null |
234 |
fi |
228 |
[[ ${insert_link_in_opts} -eq 0 ]] || opts="${link} ${opts}" |
235 |
[[ ${insert_link_in_opts} -eq 0 ]] || opts="${link} ${opts}" |
229 |
|
236 |
|
230 |
ebegin "Running pppd" |
237 |
ebegin "Running pppd" |
Lines 234-239
Link Here
|
234 |
if [[ " ${opts} " == *" updetach "* ]]; then |
241 |
if [[ " ${opts} " == *" updetach "* ]]; then |
235 |
local addr=$( interface_get_address "${iface}" ) |
242 |
local addr=$( interface_get_address "${iface}" ) |
236 |
einfo "${iface} received address ${addr}" |
243 |
einfo "${iface} received address ${addr}" |
|
|
244 |
else |
245 |
go_background |
237 |
fi |
246 |
fi |
238 |
} |
247 |
} |
239 |
|
248 |
|
Lines 244-249
Link Here
|
244 |
# Returns 0 (true) if no process to kill or it terminates successfully, |
253 |
# Returns 0 (true) if no process to kill or it terminates successfully, |
245 |
# otherwise non-zero (false) |
254 |
# otherwise non-zero (false) |
246 |
pppd_stop() { |
255 |
pppd_stop() { |
|
|
256 |
${IN_BACKGROUND} && return 0 |
257 |
|
247 |
local iface="$1" pidfile="/var/run/ppp-$1.pid" |
258 |
local iface="$1" pidfile="/var/run/ppp-$1.pid" |
248 |
|
259 |
|
249 |
[[ ! -s ${pidfile} ]] && return 0 |
260 |
[[ ! -s ${pidfile} ]] && return 0 |