--- pppd.orig 2005-11-10 23:44:22.000000000 +0200 +++ pppd 2005-11-11 00:28:18.189464848 +0200 @@ -101,6 +101,8 @@ # # Returns 0 (true) when successful, otherwise 1 pppd_start() { + ${IN_BACKGROUND} && return 0 + local iface="$1" ifvar=$( bash_variable "$1" ) opts="" link if [[ ${iface%%[0-9]*} != "ppp" ]]; then eerror "PPP can only be invoked from net.ppp[0-9]" @@ -225,6 +227,11 @@ insert_link_in_opts=0 fi + if [[ " ${opts} " == *" plugin pppoatm.so "* ]]; then + # Load the pppoa kernel module - if this fails, we have to hope + # that pppoa support is compiled into the kernel + modprobe pppoatm 2>/dev/null + fi [[ ${insert_link_in_opts} -eq 0 ]] || opts="${link} ${opts}" ebegin "Running pppd" @@ -234,6 +241,8 @@ if [[ " ${opts} " == *" updetach "* ]]; then local addr=$( interface_get_address "${iface}" ) einfo "${iface} received address ${addr}" + else + go_background fi } @@ -244,6 +253,8 @@ # Returns 0 (true) if no process to kill or it terminates successfully, # otherwise non-zero (false) pppd_stop() { + ${IN_BACKGROUND} && return 0 + local iface="$1" pidfile="/var/run/ppp-$1.pid" [[ ! -s ${pidfile} ]] && return 0