Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 53954 - Support for kernel PPPoE in the RC scripts
Summary: Support for kernel PPPoE in the RC scripts
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords: InVCS
: 68934 97972 106764 111196 (view as bug list)
Depends on:
Blocks: 43923
  Show dependency tree
 
Reported: 2004-06-15 00:59 UTC by Brad Laue (RETIRED)
Modified: 2006-02-16 08:33 UTC (History)
13 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/lib/rcscripts/net.modules.d/pppoe (pppoe,2.84 KB, text/plain)
2005-06-18 15:01 UTC, Alin Năstac (RETIRED)
Details
/lib/rcscripts/net.modules.d/pppoe (pppoe,3.21 KB, text/plain)
2005-06-19 14:13 UTC, Alin Năstac (RETIRED)
Details
support for pap/chap-secrets automatic editing (functions.new,1.54 KB, text/plain)
2005-06-19 14:17 UTC, Alin Năstac (RETIRED)
Details
support for pap/chap-secrets automatic editing (functions.new,1.88 KB, text/plain)
2005-06-19 14:51 UTC, Alin Năstac (RETIRED)
Details
/lib/rcscripts/net.modules.d/pppoe (pppoe,3.56 KB, text/plain)
2005-06-20 15:04 UTC, Alin Năstac (RETIRED)
Details
support for pap/chap-secrets automatic editing (functions.new,1.86 KB, text/plain)
2005-06-20 15:07 UTC, Alin Năstac (RETIRED)
Details
support for pap/chap-secrets automatic editing (functions.new,1.87 KB, text/plain)
2005-06-20 15:17 UTC, Alin Năstac (RETIRED)
Details
/lib/rcscripts/net.modules.d/pppoe (pppoe,3.56 KB, text/plain)
2005-06-20 15:18 UTC, Alin Năstac (RETIRED)
Details
support for pap/chap-secrets automatic editing (functions.new,2.64 KB, text/plain)
2005-06-21 22:49 UTC, Alin Năstac (RETIRED)
Details
generic ppp module (ppp,5.54 KB, text/plain)
2005-06-24 08:49 UTC, Roy Marples (RETIRED)
Details
pppd module (pppd,5.49 KB, text/plain)
2005-06-24 09:46 UTC, Roy Marples (RETIRED)
Details
generic ppp module (pppd,6.68 KB, text/plain)
2005-06-27 07:00 UTC, Roy Marples (RETIRED)
Details
latest one (pppd,6.95 KB, text/plain)
2005-06-27 11:16 UTC, Roy Marples (RETIRED)
Details
draft for ppp chapter of the net.example (net-ppp0.example,2.33 KB, text/plain)
2005-06-27 14:27 UTC, Alin Năstac (RETIRED)
Details
pppd module (pppd,7.16 KB, text/plain)
2005-06-27 22:56 UTC, Alin Năstac (RETIRED)
Details
pppd net module (pppd,7.16 KB, text/plain)
2005-06-27 22:58 UTC, Alin Năstac (RETIRED)
Details
update_secrets_file function implementation using sed -r (functions.new,2.40 KB, text/plain)
2005-06-30 22:46 UTC, Alin Năstac (RETIRED)
Details
draft for ppp chapter of the net.example (net-ppp0.example,2.44 KB, text/plain)
2005-07-02 14:36 UTC, Alin Năstac (RETIRED)
Details
pppd net module (pppd,8.74 KB, text/plain)
2005-07-02 14:47 UTC, Alin Năstac (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brad Laue (RETIRED) gentoo-dev 2004-06-15 00:59:13 UTC
A bit of a farfetched idea, but here goes...

Lately I've been playing with kernel PPPoE, which, if the distribution had built-in support, would run at much lower CPU cost and more straightforward setup than rp-pppoe (although rp-pppoe is one of the easiest things to configure already).

Kernel PPPoE involves building PPP over Ethernet support into the kernel, including 'plugin pppoe.so \n name "blah@blah.com" (where this references the appropriate user/password pair in pap-secrets)' in /etc/ppp/options.

At this point all one has to do is type 'pppd eth0 defaultroute persist', or if one wants link detection, 

/usr/sbin/pppd eth0 updetach defaultroute persist lcp-echo-interval 20 lcp-echo-failure 3

There's more to the equation which I haven't worked out yet; pppd seems to give up after five or so tries if the redback servers don't respond, leaving the host permanently down - rp-pppoe continues attempting to connect until it succeeds in connecting, so I'm either missing a pppd option or they're re-running pppd every time it dies (this is probably it).

Potential benefits of distribution support for kernel-pppoe:

1) Doesn't depend on an external pppoe package
2) Native to the kernel and our pppd ebuild, nothing else required
3) Much greater CPU efficiency (especially for slower systems)
4) Simpler to configure - would probably only require /etc/conf.d/pppoe or similar and the addition of a new interface configuration method in /etc/conf.d/net (pppoe or adsl instead of dhcp, as is used in bug #24975)
5) Would save a teeny bit of space on the livecd? Dunno about this, but it sounds good on paper.

In short, while rp-pppoe remains an excellent PPPoE package (especially in terms of portability across distributions and ease of setup), we could be leveraging the kernel's native support for PPPoE (which it's had for years now) and providing a pseudo-builtin way for users to connect to ADSL.

Opinions welcome!

Reproducible: Always
Steps to Reproduce:
Comment 1 Heinrich Wendel (RETIRED) gentoo-dev 2004-09-27 04:26:56 UTC
maybe you can come up with a patch?
Comment 2 Alin Năstac (RETIRED) gentoo-dev 2004-10-10 00:36:54 UTC
I think the options you are looking for are "persist maxfail 0".
I don't have such a configuration on my hosts nor do I used it before, so I need a working script which uses the standard ppp package, as a start point.
Comment 3 Joe Stroller 2005-03-08 16:10:29 UTC
PPPoA support would be achieved the same way in the init scripts - I am
using a Conexant AccessRunner PCI DSL modem & it needs the same thing.

I installed the kernel module & firmware for my modem by hand & emerged 
ppp-2.4.3-r1 with the new +atm use flag - it works perfectly with just a few
lines in /etc/ppp/options, including "plugin /usr/lib/pppd/2.4.3/pppoatm.so",
username & pass in chap-secrets and then simply typing `pppd`

I think this feature would be simple for someone more clueful than me to
implement, and would be especially useful now - not only are pppoe &
ppp-over-atm both in the main kernel tree, but Gentoo's ppp has an "atm"
USE flag.

I'd be happy to test & I think many others in the UK would also be glad to.
Comment 4 Alin Năstac (RETIRED) gentoo-dev 2005-06-18 15:01:45 UTC
Created attachment 61462 [details]
/lib/rcscripts/net.modules.d/pppoe

this net module add support for PPPoE. it uses only pppd and kernel support for
PPPoE.
Comment 5 Stefan Briesenick (RETIRED) gentoo-dev 2005-06-18 15:47:59 UTC
hmm, what's the problem actually?  
I'm running ppp with the pppoe plugin and it works great. 
 
But the pppoe net-plugin seems to be a much cleaner way to setup it. But you 
should add "noproxyarp" to the options IMHO. 
 
and: how is the name of the ppp device? 
 
Comment 6 Alin Năstac (RETIRED) gentoo-dev 2005-06-19 01:32:25 UTC
the real ppp device name cannot be influcenced in any way. however, the name of
the link can be set. my module sets it to the name of the NIC (e.g. eth0).

as for noproxyarp, I don't see why we should disable proxyarp since I do not set
it. If the user added proxyarp in /etc/ppp/options, he/she knows what is doing.
Comment 7 Alin Năstac (RETIRED) gentoo-dev 2005-06-19 14:13:01 UTC
Created attachment 61517 [details]
/lib/rcscripts/net.modules.d/pppoe

A new version that edit /etc/ppp/{pap-secrets,chap-secrets}
Comment 8 Alin Năstac (RETIRED) gentoo-dev 2005-06-19 14:17:31 UTC
Created attachment 61518 [details]
support for pap/chap-secrets automatic editing

these 2 functions must be added to 
/lib/rcscripts/net.modules.d/helpers.d/functions

this support will also be used in the new ppp module (which replaces the actual
/etc/init.d/net.ppp0).
Comment 9 Alin Năstac (RETIRED) gentoo-dev 2005-06-19 14:51:19 UTC
Created attachment 61523 [details]
support for pap/chap-secrets automatic editing

The 2 functions proven to be 3 :)
Comment 10 Stefan Briesenick (RETIRED) gentoo-dev 2005-06-19 21:27:52 UTC
Alin, I only asked, because I have special iptables set up for my ppp0 device. 
Since you have a physical ethernet device (ethX) and a logical ppp device 
(pppX) you have to setup your firewall rules according to these devices names. 
 
So it's ok to have a net.ethX for pppoe, but you have to set a fixed pppX for 
this device, otherwise your firewall rules will be messed. ;) 
 
So just add an option, such as 'pppoe_link_name'. 
 
Comment 11 Stefan Briesenick (RETIRED) gentoo-dev 2005-06-19 21:32:40 UTC
huh, btw, wouldn't it be better do pass the password via stdin to ppp? It isn't 
necessary to write it into the pap-secrets. Currently, I'm using the 
password.so plugin to pass it in my peers/* file. 
 
Comment 12 Alin Năstac (RETIRED) gentoo-dev 2005-06-19 22:43:00 UTC
(In reply to comment #10)

I am not aware of such pppd option. Only logical name of the ppp interface can
be modified through options and as I said, I already set it to the name of the
Ethernet interface. If you know how to force a name on a ppp interface, please
let me know.
If you have multiple ppp links and cannot use generic interface names such as -i
ppp+, you could use /etc/ppp/{ip-up.local,ip-down.local} to alter firewall rules
according to your needs.

(In reply to comment #11)
Indeed, passwordfd.so plugin appears to be a much cleaner approach. uberlord,
please let me know what method do you prefer. 
Comment 13 Stefan Briesenick (RETIRED) gentoo-dev 2005-06-19 23:06:53 UTC
I meant the logical pppX device. I have to know this name to setup my firewall.  
You can see this device via ifconfig:  
  
ppp0  Protokoll:Punkt-zu-Punkt Verbindung  
      inet Adresse:XXX.XX.XX.XXX  P-z-P:XXX.X.XX.XXX  Maske:255.255.255.255  
      UP PUNKTZUPUNKT RUNNING NOARP MULTICAST  MTU:1492  Metric:1  
      RX packets:5453 errors:0 dropped:0 overruns:0 frame:0  
      TX packets:6520 errors:0 dropped:0 overruns:0 carrier:0  
      Kollisionen:0 Sendewarteschlangenl
Comment 14 Stefan Briesenick (RETIRED) gentoo-dev 2005-06-19 23:06:53 UTC
I meant the logical pppX device. I have to know this name to setup my firewall.  
You can see this device via ifconfig:  
  
ppp0  Protokoll:Punkt-zu-Punkt Verbindung  
      inet Adresse:XXX.XX.XX.XXX  P-z-P:XXX.X.XX.XXX  Maske:255.255.255.255  
      UP PUNKTZUPUNKT RUNNING NOARP MULTICAST  MTU:1492  Metric:1  
      RX packets:5453 errors:0 dropped:0 overruns:0 frame:0  
      TX packets:6520 errors:0 dropped:0 overruns:0 carrier:0  
      Kollisionen:0 Sendewarteschlangenlänge:3  
      RX bytes:2059404 (1.9 Mb)  TX bytes:759693 (741.8 Kb)  
  
setting it to the same name as the physical Ethernet device is odd, because my  
ethX (eth2 in my case) only routes to my DSL-Modem. I need two different  
network device names! The physical eth2 device is just the link to my modem, 
while the logical ppp0 device is the route to internet. 
 
this is how ppp runs on my system now: 
 
/usr/sbin/pppd lock persist holdoff 10 defaultroute ipparam fritzbox linkname 
ppp0 call fritzbox noauth ktune maxfail 0 hide-password 
 
as you can see, 'linkname' sets up the ppp0 device. And that's all I need. 
 
Comment 15 Stefan Briesenick (RETIRED) gentoo-dev 2005-06-19 23:19:04 UTC
> Indeed, passwordfd.so plugin appears to be a much cleaner 
> approach. uberlord, please let me know what method do you prefer. 
 
hmm. Just an idea: if the user specifies a password in /etc/conf.d/net, then 
use passwordfd.so, if not do nothing! Then the user has to specify it in 
pap-secrets by himself. You can document this behaviour in a comment 
in /etc/conf.d/net.example. 
 
Comment 16 Alin Năstac (RETIRED) gentoo-dev 2005-06-20 00:03:59 UTC
(In reply to comment #13)
> I meant the logical pppX device. I have to know this name to setup my firewall.  
[snip]
> as you can see, 'linkname' sets up the ppp0 device. And that's all I need. 

the linkname option do not set the real name of the interface . the real name of
the interface will still be pppX. I *can't* influence the real name of the
interface (the one that matters from the iptables perspective).
Comment 17 Roy Marples (RETIRED) gentoo-dev 2005-06-20 04:57:45 UTC
I have a few issues with these patches

1) the support for automatic editing should remain in the pppoe module until
another module requires it

2) please use style consitent with baselayout

if .... then ;
fi

instead of

[[ ... ]] && {
}

[[ -f ${foo} ]]
instead of
[ -f "${foo} ]

3) pppoe_setup_vars should be in pppoe_start as it's the only place where it's
needed - also ensure that the vars are localised

4) suggest changing pppoe_mtu_${iface} to mtu_${iface} and we patch
ifconfig/iproute2 modules accordingly

5) 10.112.112.112:10.112.112.113 - is that a hardcoded ip or something special?

6) way too many sed calls - here's how to double backslash in bash
foo="${foo//\\\\/\\\\}"

I'm also sure that bash can do s/\([/.*]\)/[\1]/g as soon as sometime tells me
what it's supposed to do ;)
Comment 18 Alin Năstac (RETIRED) gentoo-dev 2005-06-20 05:49:34 UTC
(In reply to comment #16)
> I have a few issues with these patches
> 
> 1) the support for automatic editing should remain in the pppoe module until
> another module requires it

it will be required by the upcoming ppp module. however I'm seriously thinking
to drop it in favor of passwdfd.so plugin usage.

> 4) suggest changing pppoe_mtu_${iface} to mtu_${iface} and we patch
> ifconfig/iproute2 modules accordingly

don't think so. you see, the created ppp device use a slightly smaller MTU than
eth interface does. you should not use the passed mtu in other place than pppoe
setup.

> 5) 10.112.112.112:10.112.112.113 - is that a hardcoded ip or something special?

nothing special. we need a phony address for on-demand links. I choosed to use
the same thing that rp-pppoe does.

> 6) way too many sed calls - here's how to double backslash in bash
> foo="${foo//\\\\/\\\\}"
> 
> I'm also sure that bash can do s/\([/.*]\)/[\1]/g as soon as sometime tells me
> what it's supposed to do ;)

ok, maybe I could replace these with ${foo//.../...}. however, in the event I
use passwdfd.so plugin, these are no longer needed.
Comment 19 Alin Năstac (RETIRED) gentoo-dev 2005-06-20 15:04:38 UTC
Created attachment 61597 [details]
/lib/rcscripts/net.modules.d/pppoe

Changed as requested. Unfortunately passwordfd.so plugin does not work without
"nodetach" so I kept my original solution (updating pap/chap-secrets files).

I've also rearranged parameters in order of importance.
Comment 20 Alin Năstac (RETIRED) gentoo-dev 2005-06-20 15:07:06 UTC
Created attachment 61598 [details]
support for pap/chap-secrets automatic editing

Replaced seds as much as possible.

Sorry for insisting, but these functions will be used in the future ppp module
so it should be declared in /lib/rcscripts/net.modules.d/helpers.d/functions
Comment 21 Alin Năstac (RETIRED) gentoo-dev 2005-06-20 15:17:22 UTC
Created attachment 61599 [details]
support for pap/chap-secrets automatic editing 

ops... missed some spots
Comment 22 Alin Năstac (RETIRED) gentoo-dev 2005-06-20 15:18:58 UTC
Created attachment 61600 [details]
/lib/rcscripts/net.modules.d/pppoe

discovered that HUP does not kill pppd process. I've replaced with TERM.
Comment 23 Alin Năstac (RETIRED) gentoo-dev 2005-06-21 22:49:56 UTC
Created attachment 61699 [details]
support for pap/chap-secrets automatic editing 

I've tested a bit and discovered that I cannot escape /
Comment 24 Roy Marples (RETIRED) gentoo-dev 2005-06-22 09:59:21 UTC
Is there any reason why we can't make this a generic ppp module?

ppp_plugins_eth0=( "rp-pppoe" )
or
ppp_plugins_eth0=( "pppoatm" )

BTW thanks for the chat and the insight an ppp Alin :)
Comment 25 Stefan Briesenick (RETIRED) gentoo-dev 2005-06-22 16:02:18 UTC
but then don't forget:

ppp_plugins_eth0=( "capi" )

since some of the AVM controllers are using DSL via CAPI. I can provide the ppp
options for DSL via CAPI if you want.
Comment 26 Stefan Briesenick (RETIRED) gentoo-dev 2005-06-22 16:07:45 UTC
oh, we don't have a NIC for CAPI based DSL-Controllers.
so: ppp_plugins_ppp0=( "capi" )
or: ppp_plugins_controller1=( "capi" )

;-)
Comment 27 Alin Năstac (RETIRED) gentoo-dev 2005-06-22 23:07:53 UTC
guys, if you wanna make a generic ppp module, keep in mind that pppoe's options
should have a precise order (at least some of them).

Yesterday I've talked with Roy on chat. He said the module should be initialized
by a net.ppp0 module, idea I didn't embraced at that moment. 
Now I think it is the best thing to separate it from the transport channel (in
this case eth0). This information could be passed to pppoe module by a param
(e.g. pppoe_eth_interface_ppp0="eth0").

On the matter pppoe vs pppoa, I guess we could rename the module as pppox and
let the user decide what plugin should be loaded, but I don't agree we should do
it in one generic module for the reasons expressed above and because:
 a) the name will confuse the user - peeps search for known terms like pppoe and
pppoa
 b) rp-pppoe.so plugin has parameters that are unknown to pppoatm.

Comment 28 Roy Marples (RETIRED) gentoo-dev 2005-06-22 23:30:01 UTC
(In reply to comment #26)
> guys, if you wanna make a generic ppp module, keep in mind that pppoe's options
> should have a precise order (at least some of them).

We can juggle them if needed

> 
> Yesterday I've talked with Roy on chat. He said the module should be initialized
> by a net.ppp0 module, idea I didn't embraced at that moment. 
> Now I think it is the best thing to separate it from the transport channel (in
> this case eth0). This information could be passed to pppoe module by a param
> (e.g. pppoe_eth_interface_ppp0="eth0").

Heh - Now I'm starting to think your way as I can't find any way of forcing the
ppp interface name - unless we patch ppp :/

> 
> On the matter pppoe vs pppoa, I guess we could rename the module as pppox and
> let the user decide what plugin should be loaded, but I don't agree we should do
> it in one generic module for the reasons expressed above and because:
>  a) the name will confuse the user - peeps search for known terms like pppoe and
> pppoa

Doucmentation

PPP (covers PPPoE, PPPoA, ADSL, etc)

>  b) rp-pppoe.so plugin has parameters that are unknown to pppoatm.
> 
>

Which is a good reason for them to be included as extra options
ppp_rp_ppoe_option1_eth0="foo"
ppp_options_eth0="option1 foo"

The user still has to *know* the option to set it. Therefore, it would be
documented at some stage, therefore I still don't see the need for all the
parameter options pppd and it's modules can use.
Comment 29 Roy Marples (RETIRED) gentoo-dev 2005-06-23 01:02:01 UTC
We can also do

case "${plugin}"
   rp-pppoe)
     # do default pppoe option setup
   pppatm)
     # do default pppoa option setup
   *)
     # user options?
esac

I'm really trying to do this inside one module as pppoe, pppoa and others all
provide "ppp" and they all use the same binary - so it really just comes down to
what options to give it and how we go about it.
Comment 30 Alin Năstac (RETIRED) gentoo-dev 2005-06-23 02:09:09 UTC
ok lets establish a common ground on all possible ppp links.

command should begin with "/usr/sbin/pppd persist maxfail 0". this is a
requirement (pppd should run until service is taken down with net.ppp0 stop) and
it isn't user configurable.

next, we should add link information. probably is a good idea to name the link
as virtual-ppp0 since we cannot force pppd to allocate a specific pppx to this
connection :
  remotename ${virtifname} linkname ${virtifname} ipparam ${virtifname}

if ${user} is not empty, we should add "user ${user}". also update secrets files
if ${password} is not empty.

after that, all things should be set by optional lines found in array vars like
$ppp_options_ppp0 and/or $ppp_options. the following lines should be found in
net.example:
  - usual params but user configurable for what we care:
     noauth defaultroute
  - support for on-demand links
     demand idle 60 10.112.112.112:10.112.112.113 ipcp-accept-remote
ipcp-accept-local
  - lcp-echo examples
     lcp-echo-interval 15 lcp-echo-failure 3

next part is pppoe only:
  connect true plugin rp-pppoe.so ( ... optional rp_pppoe_service and
rp_pppoe_ac ...) eth0
  noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp
Comment 31 Alin Năstac (RETIRED) gentoo-dev 2005-06-23 12:02:19 UTC
uberlord discovered on web that we can set name of the ppp interface by using
"unit" parameter.
this means that pppd command should start with "/usr/sbin/pppd persist maxfail 0
unit ${iface#ppp}"

also, when the link is not on-demand (no idle param), the command line should
contain "updetach", which will guarantee that the link is started at the end of
ppp_start function.
Comment 32 Stefan Briesenick (RETIRED) gentoo-dev 2005-06-23 14:03:56 UTC
first of all: I love the idea of a ppp-net-plugin. 
 
But after all talk about pppoe vs. pppoa, please don't forget capiplugin.so! 
CAPI is used for ISDN primarily, but also for some DSL cards from AVM. The 
options for ppp are only a litte bit different to the rp-pppoe.so plugin. So it 
should be easy to handle it also. I can provide all informations about it. 
 
Furthermore, having CAPI connections handled by ppp (and as such by the 
net-plugin) would be really great for ISDN users also. 
 
Comment 33 Alin Năstac (RETIRED) gentoo-dev 2005-06-23 14:06:52 UTC
Stefan, please provide here the necessary information about wanted functionality
regarding CAPI.
Comment 34 Stefan Briesenick (RETIRED) gentoo-dev 2005-06-23 14:50:58 UTC
@Alin: ok, I provide the working contents of my peer-file for some AVM hardware 
we got from AVM. I explain some of the options after. 
 
plugin capiplugin.so 
plugin userpass.so 
connect "" 
avmadsl 
sync 
mru 1492 
mtu 1492 
idle 86400 
holdoff 60 
lcp-echo-interval 10 
lcp-echo-failure 3 
lcp-max-configure 50 
lcp-max-terminate 2 
ipcp-accept-remote 
ipcp-accept-local 
user <myuserid> 
password <mypassword> 
noproxyarp 
noauth 
noccp 
noipx 
: 
/dev/null 
 
Some explainations: 
 
'avmadsl' tells the capiplugin to use /etc/drdsl/adsl.conf which can be created 
with net-dialup/drdsl. In 'adsl.conf' there are the defaults for your 
DSL-Controller. 'drdsl' autodetects controller and vpi/vci settings. So during 
setup, you run 'drdsl' once and then you have this values in: 
 
controller 2 
protocol adslpppoe 
vpi 1 
vci 32 
 
'controller' is by default '1'. You can have as many CAPI controllers 
(ISDN/DSL) as you want. On DSL only boards, you have only "controller 1", as 
long you don't have some ISDN controller also. On the Combi-Boards with ISDN 
*and* DSL, ISDN part is controller 1 and DSL is controller 2. '/dev/null' is 
just the device-dummy for the "modem-device" (/dev/ttySX), because we don't 
need it. For AVM DSL-Controllers, 'controller', 'protocol' and such (see above) 
should be taken from 'adsl.conf' (see avmadsl option). For ISDN-Controllers, it 
should be explicitly specified on commandline, since you don't have that config 
file (see below). 
 
The rest should be obvious. Please emerge net-dialup/capi4k-utils and you will 
find a really good sample-file for a DSL connection in /etc/ppp/peers/t-dsl and 
in /etc/ppp/peers/capi-isdn an example for an ISDN connection via CAPI. 
 
working CAPI peers file: 
 
sync 
noauth 
-chap 
defaultroute 
plugin userpass.so 
plugin capiplugin.so 
controller 1 
protocol hdlc 
#numberprefix 0 
number <phonenumber> 
user <myuserid> 
password <mypassword> 
/dev/null 
 
So to put the important options together: 
 
1. DSL via CAPI: 
plugin capiplugin.so 
avmadsl 
/dev/null 
 
2. ISDN via CAPI: 
plugin capiplugin.so 
controller 1 
protocol hdlc 
numberprefix 0  <- optional 
number <phonenumber> 
/dev/null 
 
Comment 35 Roy Marples (RETIRED) gentoo-dev 2005-06-24 08:49:09 UTC
Created attachment 61844 [details]
generic ppp module

OK gang - here's my first draft of a generic ppp module. Should work with
stable baselayout just fine.

Options in /etc/conf.d/net
link_ppp0="eth0" # whatever the link is you're using
username_ppp0="foo"
password_ppp0="bar"
mtu_ppp0="1492" # 1492 is supplied as a default by us if not specified
pppd_ppp0="what ever options you want"
plugins_ppp0=(
   "pppoe any pppoe options you want"
   "anotherplugin some more options for this plugin"
)

This should work just fine :)
However, me may want to put some default options that a plugin needs in the
module that the user will always need - I'll leave that for you guys to decide
as I have no working ppp enviroment - yet.
Comment 36 Roy Marples (RETIRED) gentoo-dev 2005-06-24 09:46:06 UTC
Created attachment 61849 [details]
pppd module

pppd module provides ppp - this makes us more consistent with other modules
fixed a minor bug and updated function comments
Comment 37 Alin Năstac (RETIRED) gentoo-dev 2005-06-25 01:19:49 UTC
These are my observations:
 - I _really_ don't like the fact you throwed away my hard work regarding
secrets files. Your solution rewrites them every time you start a ppp
connection. No need to tell ya what would happen when you have 2 ppp
connections. Again, my solution is complete and if anyone finds a bug in it, I'd
be happy to fix it.
 - "nodetach" should be forbidden - it would block the module. Instead, you
should add "updetach" (if "idle" is not set).
 - remotename should be $iface and ipparam should be removed (no need for it)
also, unit should be set after maxfail (it is a forced option after all)
 - mtu/mru should not have vars of their own. if the user wanna set a different
mtu, is free to do it pppd_ppp0. The default mtu (1500) set by pppd is the best
default for generic case. Also you should note even if you set 1500 on a PPPoE,
the mtu set by pppd would be $(( $mtu_eth0 - 9 ))
 - if /etc/ppp/options.$iface exists, its name should be appended to command
line as "file /etc/ppp/options.$iface"
  
Comment 38 Roy Marples (RETIRED) gentoo-dev 2005-06-27 07:00:06 UTC
Created attachment 62051 [details]
generic ppp module

 - "nodetach" should be forbidden - it would block the module. Instead, you
should add "updetach" (if "idle" is not set).
 - remotename should be $iface and ipparam should be removed (no need for it)
also, unit should be set after maxfail (it is a forced option after all)
 - mtu/mru should not have vars of their own. if the user wanna set a different

mtu, is free to do it pppd_ppp0. The default mtu (1500) set by pppd is the best

default for generic case. Also you should note even if you set 1500 on a PPPoE,

the mtu set by pppd would be $(( $mtu_eth0 - 9 ))
 - if /etc/ppp/options.$iface exists, its name should be appended to command
line as "file /etc/ppp/options.$iface"

^^^^^^
All that is done.
Comment 39 Roy Marples (RETIRED) gentoo-dev 2005-06-27 07:01:44 UTC
(In reply to comment #36)
> These are my observations:
>  - I _really_ don't like the fact you throwed away my hard work regarding
> secrets files. Your solution rewrites them every time you start a ppp
> connection. No need to tell ya what would happen when you have 2 ppp
> connections. Again, my solution is complete and if anyone finds a bug in it, I'd
> be happy to fix it.

You have 3 sed statements compared to one egrep + mv - which is more efficient?
Checking to see if the file needs updating is one more egrep call which is still
more efficient.
And that's not even thinking about the loop you run to find an available sed
seperator.

As to re-writing the file every thime ppp is started - so what? Your solution
still re-writes the file if it needs to which would affect a running pppd daemon
in exactly the same way as mine would.
Comment 40 Alin Năstac (RETIRED) gentoo-dev 2005-06-27 07:09:53 UTC
(In reply to comment #38)
> You have 3 sed statements compared to one egrep + mv - which is more efficient?
> Checking to see if the file needs updating is one more egrep call which is still
> more efficient.

Wrong. In the worst case, I have 2 seds. In the best case (nothing changed) I
have 1 sed.

> And that's not even thinking about the loop you run to find an available sed
> seperator.

Again, this loop is ran only when something has changed.

> As to re-writing the file every thime ppp is started - so what? Your solution
> still re-writes the file if it needs to which would affect a running pppd daemon
> in exactly the same way as mine would.

Wrong again. My solution does not rewrite anything it does not own while yours
delete everything else.

My variant is a complete solution for _editing_ secrets files. Please use the
right tool for the job.
Comment 41 Roy Marples (RETIRED) gentoo-dev 2005-06-27 11:16:43 UTC
Created attachment 62083 [details]
latest one
Comment 42 Alin Năstac (RETIRED) gentoo-dev 2005-06-27 14:18:33 UTC
The last version refuses to work for me, even if the same pppd command line
works fine from bash! Here is the output:
Plugin rp-pppoe.so loaded.
RP-PPPoE plugin version 3.3 compiled against pppd 2.4.3
using channel 38
Using interface ppp0
Connect: ppp0 <--> eth0
Couldn't increase MTU to 1500
Couldn't increase MRU to 1500
sent [LCP ConfReq id=0x1 <magic 0x986a4b62>]
rcvd [LCP ConfReq id=0x1 <auth pap> <magic 0xdf6d9e9>]
No auth is possible
sent [LCP ConfRej id=0x1 <auth pap>]
rcvd [LCP ConfAck id=0x1 <magic 0x986a4b62>]
rcvd [LCP ConfReq id=0x2 <magic 0xdf6d9e9>]
sent [LCP ConfAck id=0x2 <magic 0xdf6d9e9>]
Couldn't increase MTU to 1500
Couldn't increase MRU to 1500
sent [LCP EchoReq id=0x0 magic=0x986a4b62]
peer from calling number 00:0A:E6:BA:73:4C authorized
kernel does not support PPP filtering
sent [IPCP ConfReq id=0x1 <addr 217.156.27.36>]
rcvd [LCP EchoReq id=0x0 magic=0xdf6d9e9]
sent [LCP EchoRep id=0x0 magic=0x986a4b62]
rcvd [LCP TermReq id=0x3 "peer refused to authenticate"]
LCP terminated by peer (peer refused to authenticate)
Couldn't increase MTU to 1500
Couldn't increase MRU to 1500
sent [LCP TermAck id=0x3]
Connection terminated.
using channel 39
Using interface ppp0
Connect: ppp0 <--> eth0
Couldn't increase MTU to 1500
Couldn't increase MRU to 1500
sent [LCP ConfReq id=0x2 <magic 0x274a40e2>]
Modem hangup

I am too pissed off to see what the hell changed from the working version. Maybe
tomorrow... 
Comment 43 Alin Năstac (RETIRED) gentoo-dev 2005-06-27 14:27:02 UTC
Created attachment 62109 [details]
draft for ppp chapter of the net.example

As you can see I've added 3 options that needs to be implemented.
When chat_ppp0 is not empty, a new option should be appended to ${opts}, just
before plugins:
 "connect \"/usr/sbin/chat " + "-T 'first_phone_no' " (if not empty) + "-U
'second_phone_no'" (if not empty) + quoted members of chat_ppp0 + "\""
Comment 44 Alin Năstac (RETIRED) gentoo-dev 2005-06-27 22:56:14 UTC
Created attachment 62123 [details]
pppd module

This version IS the last one. If you not accept it as is, I will pull myself
out of this bug. I'm not used to work for nothing, ya know! Don't worry, all
tabs have been replaced with 4 spaces.

Changed things:
 - linkname has been removed. instead we use /var/run/ppp${unit}.pid, which is
the real pid file.
 - user \"${username}\", for some strange reason, refuses to work. removed
quotation.
 - some minor reordering
 - correct indentation

To do:
 - needs an implementation for handling chat parameters.
Comment 45 Alin Năstac (RETIRED) gentoo-dev 2005-06-27 22:58:28 UTC
Created attachment 62124 [details]
pppd net module

the previous version still had tabs.
Comment 46 Alin Năstac (RETIRED) gentoo-dev 2005-06-30 22:46:12 UTC
Created attachment 62377 [details]
update_secrets_file function implementation using sed -r

I've redesigned my original implementation of update_secrets_file function.
The new version does not search for s separator anymore and it was tested with
every special chars.
N.B.: this function will not work if you have double quotes (") or quote (') in
username/remotename/password. It could be done, but I don't think it will be
useful to anyone.
Comment 47 Alin Năstac (RETIRED) gentoo-dev 2005-07-02 14:36:44 UTC
Created attachment 62505 [details]
draft for ppp chapter of the net.example

Updated example config file.
Comment 48 Alin Năstac (RETIRED) gentoo-dev 2005-07-02 14:47:10 UTC
Created attachment 62508 [details]
pppd net module

Updated the net module with following changes:
 - replace update_secrets_file with my implementation based on sed (modified to
work with any chars, including double quotes)
 - add chat connect script support
 - add ${link} to pppd options (when pppoe plugin isn't used)
 - fixed bug when plugins_ppp0 is empty (the old implementation tried to load
the plugin named ".so")

Stefan, please test it on your ISDN connection and see if I've missed
something. Also, you should provide an example of ISDN connection.
Comment 49 Kostas Kavourakis 2005-07-07 01:30:02 UTC
Hello, I will attemp to test this module, I have just one question: Should I
make net.ppp0 a link to net.lo and delete the original net.ppp0 installed with pppd?
Thank you.
Comment 50 Alin Năstac (RETIRED) gentoo-dev 2005-07-07 02:32:24 UTC
of course. I forgot to tell you that ;)
Comment 51 Kostas Kavourakis 2005-07-07 03:55:58 UTC
Ok, I got it to work but I have some concerns. I added net.ppp0 in my default
runlevel and I noticed a big delay in the boot process. It was trying to bring
ppp0 up and it waited until pppd managed to connect. But what will happen if the
ISP is down for some reason and pppd cannot connect? The boot process will stay
frozen until pppd manages to connect? I realize ofcource this is just for
testing now, but it looks promising.
Comment 52 Alin Năstac (RETIRED) gentoo-dev 2005-07-07 04:37:47 UTC
when you start net.ppp0, it will wait till gets connected.
at the end of /etc/init.d/net.ppp0 users know the link is up & ready (don't see
any reason why it should be otherwise).
Comment 53 Kostas Kavourakis 2005-07-07 04:45:28 UTC
I unterstand your logic, I am just saying that if pppd cannot connect and it is
in the default runlevel, and configured to try forever, the system will just not
boot!
Comment 54 Alin Năstac (RETIRED) gentoo-dev 2005-07-07 04:56:24 UTC
And what do you think it should do? You think is better to remove "updetach"
from pppd's options and let other rcscripts think that the net has been started?

You are free to set your own "maxfail" if you really want it, but don't complain
if you discover once in awhile that pppd has died.
Comment 55 Kostas Kavourakis 2005-07-07 05:03:56 UTC
Well, for my needs, I would prefer it if pppd was stared, even if it could not
connect imediately, to just keep trying, while continuing the boot process. If I
unterstand you correctly, I can achieve this by removing the "updetach" option?
I will give it a shot and see how it works.
Comment 56 Kostas Kavourakis 2005-07-07 05:41:20 UTC
Ok, it worked. I removed the "updetach" option and commented a couple of lines,
and now it behaves like adsl-connect more or less. When I start the service, it
detaches immediately and continues booting normaly.
 That kind of behavior is wanted on PPPoE (and PPPoA?) links, on desktop systems
and home servers. I recognise that it cannot be the default behavior if this
module is to be a generic ppp module, so I asking, can this be made
configurable? Maybe with an entry in /etc/conf.d/net?
 This is a very good script, and I just try to make you see my point of view as
home user. Thank you.
Comment 57 George Papadopoulos 2005-07-08 09:16:08 UTC
I had this problem with the approach you`ve been suggeting. My password uses
special characters. Now, when I entered it in /etc/conf.d/net as 

password_ppp0="so!me$pass" and then started net.ppp0 I would get a wrong
username/password error message. I checked in /etc/ppp/chap-secrets and noticed
that the several characters of the password had been trucated after the dollar
sign. The password had effectively been turned into something like this : 

"user@isp.com" ppp0 "somess", so authentication would fail. I solved this (thank
to Costas Cavouracis) by inserting a "\" before the dollar sign in /etc/conf.d/net. 

Nonetheles, I don`t think this should constitute norm behaviour!


Comment 58 Roy Marples (RETIRED) gentoo-dev 2005-07-08 12:38:05 UTC
(In reply to comment #56)
> I had this problem with the approach you`ve been suggeting. My password uses
> special characters. Now, when I entered it in /etc/conf.d/net as 
> 
> password_ppp0="so!me$pass"

So use the following

password_ppp0='so!me$pass'

The single quotes mean don't "expand" anything - the $ symbol denote pass as a
variable otherwise
Comment 59 Kostas Kavourakis 2005-07-08 23:30:35 UTC
(In reply to comment #57)

Well, I'll be sure to tell him, since he's not in the CC list. Thanks.
Comment 60 George Papadopoulos 2005-07-12 21:30:20 UTC
ok. I switched to single quotation marks now and removed the '\' character. Hope
that works!
Comment 61 Kostas Kavourakis 2005-08-23 08:47:06 UTC
Baselayout 1.12 is coming closer to stable, will this pppd module work with it?
I'm using it for my dsl pppoe connection over a month now without any problems,
and I would like it to stay that way. I would hate to return to rp-pppoe, and
this bug hasn't been active a long time now...
Comment 62 Roy Marples (RETIRED) gentoo-dev 2005-08-23 09:27:38 UTC
It should work as is.

Reason I've not been active on getting this into baselayout is for a few reasons

1) I cannot get any pppoe to work on my systems :/
2) Once 1) is satisfied, it *may* need a patch to change where it stores it's
configs, but I can only verify this once I have it basically working.

But the code itself should work just fine :)
Why don't you try it out with 1.12.0_pre6?
Comment 63 Roy Marples (RETIRED) gentoo-dev 2005-09-14 04:31:11 UTC
pppd module is in our svn repo, will be in baselayout-1.12.0_pre9
Comment 64 Kostas Kavourakis 2005-09-14 04:40:54 UTC
Excelent news!
Comment 65 Gabriel Devenyi 2005-09-23 16:56:22 UTC
When is baselayout-1.12.0 expected to be released? 
Comment 66 Georgi Georgiev 2005-10-07 07:50:53 UTC
*** Bug 106764 has been marked as a duplicate of this bug. ***
Comment 67 Roy Marples (RETIRED) gentoo-dev 2005-10-11 08:28:31 UTC
pre9 is now out.

Could everyone following this bug please try it out?
Hopefully I'll get the doc's merged for pre10
Comment 68 Kostas Kavourakis 2005-10-14 03:30:37 UTC
I tried pre9, the pppd module works just fine for my PPPoE ADSL connection, but
I reverted to the stable baselayout due to other, unrelated to pppd, problems
with baselayout.
Comment 69 Henrik Brix Andersen 2005-10-20 03:11:53 UTC
I've just tested the pppd net module in sys-apps/baselayout-1.12.0_pre9-r1 with
my cell phone and GPRS.

To get that working, I prefer (as I've always done this in the past) to do the
entire configuration in /etc/ppp/options.ppp0. To get this working with the new
pppd module, I have to cheat and add 

config_ppp0=( "ppp" )
link_ppp0=" "

to /etc/conf.d/net. Notice the empty link_ppp0 setting.

I suggest making the link_pppX setting optional, as it is not needed when doing
the entire configuration in an external file (which is already supported by the
pppd module). I'd be happy to make a patch for this, if people agree.
Comment 70 Alin Năstac (RETIRED) gentoo-dev 2005-10-20 07:58:53 UTC
link_ppp0 is a required parameter in almost every type of PPP connections. I
think you should use /etc/ppp/options.ppp0 for all the other options but link.

Of course, if Roy agrees, the module could be patched to have some parameter
like "use_external_config_ppp0=yes", which instead will simply run pppd -f
/etc/ppp/options.${iface}
Comment 71 Henrik Brix Andersen 2005-10-20 08:39:59 UTC
Required, sure - but why treat it specially? I can set all other options in
/etc/ppp/options.ppp0, why not allow me to set link there and have all
configuration variables in one place as opposed to scattered between two config
files with no good reason?

All link_ppp0 is used for is appending to the pppd command line...
Comment 72 Henrik Brix Andersen 2005-10-20 08:41:15 UTC
btw, the pppd module already appends "-f /etc/ppp/options.${iface}" to the pppd
command line if that file exists.
Comment 73 Alin Năstac (RETIRED) gentoo-dev 2005-10-20 08:50:55 UTC
(In reply to comment #70)
> All link_ppp0 is used for is appending to the pppd command line...

nope. For the usual PPP connections, link is the first parameter, but for PPPoE
plugin, it must be in a certain place, more exactly after the last parameter of
the pppoe plugin.
You could argue that link could be safely added to the end of parameters string,
but I've seen some pretty annoying incompatibilities between ppp-2.4.2 and
ppp-2.4.3, triggered by rp-pppoe package.
Comment 74 Henrik Brix Andersen 2005-10-21 00:09:53 UTC
(In reply to comment #72)
> nope. For the usual PPP connections, link is the first parameter

For "normal" PPP connections, I believe the link parameter can be anywhere.

> but for PPPoE plugin, it must be in a certain place, more exactly after the
last parameter of
> the pppoe plugin.

Ok - how about making the link_${iface} var required for pppoe connections, but
optional for all other types of PPP connections?

Comment 75 Roy Marples (RETIRED) gentoo-dev 2005-10-21 02:05:15 UTC
This may sound a bit radical, but how about patching pppoe plugin so that it can
read the link parameter from anywhere on the command line or the config file?

Surely it can't be that hard, and it would solve this issue :)
Comment 76 Alin Năstac (RETIRED) gentoo-dev 2005-10-21 22:56:33 UTC
(In reply to comment #74)
> This may sound a bit radical, but how about patching pppoe plugin so that it can
> read the link parameter from anywhere on the command line or the config file?
no can't do! 
pppoe plugin cannot read parameters situated before "plugin rp-pppoe.so" anyway.

you could require link_${iface} only for pppoe, but I wonder how many bugs will
be filled because users forget to set the link in command line. this module was
created for making the life easier for its users and to make them dump that
rp-pppoe (I'm still amazed why we adopted that bunch of bash scripts when we
could write our own).
Comment 77 SpanKY gentoo-dev 2005-10-26 11:36:04 UTC
*** Bug 68934 has been marked as a duplicate of this bug. ***
Comment 78 SpanKY gentoo-dev 2005-10-26 11:36:27 UTC
*** Bug 97972 has been marked as a duplicate of this bug. ***
Comment 79 Stefan Briesenick (RETIRED) gentoo-dev 2005-10-30 12:01:01 UTC
I tested the ppp module with CAPI (only ISDN connection, DSL not yet). It 
works.   
     
When I run "/etc/init.d/net.ppp0 start" it starts the connection, but then it     
"hangs". I can ctrl-c it and with "/etc/init.d/net.ppp0 stop" I can stop the     
connection. Is there anything wrong with my setup?     
     
config_ppp0=( "ppp" )    
link_ppp0="/dev/null"    
username_ppp0="XXXXXX"    
password_ppp0="XXXXXX"    
pppd_ppp0="sync noauth -chap defaultroute"  
plugins_ppp0=( "capiplugin controller 1 protocol hdlc number XXXXXXXXXXX" )    
   
the only ugly thing is the link_ppp0 since CAPI don't need special devices. Can  
this be the default somehow? Furthermore, we need examples 
in /etc/conf.d/net.example ;-) 
 
My next tests are CAPI with AVM DSL-Controllers and of course PPPoE (which 
should work I guess). 
 
Comment 80 Alin Năstac (RETIRED) gentoo-dev 2005-10-30 12:14:00 UTC
maybe you have nodetach in /etc/ppp/options.
launch /etc/init.d/net.ppp0 start in one terminal, copy the command line and try
it yourself. if it hangs in terminal, it will hang the net module as well.

I don't mind making link_ppp0 optional for connections that don't use pppoe plugin.
Comment 81 Stefan Briesenick (RETIRED) gentoo-dev 2005-10-30 13:34:31 UTC
well, it works now. Don't know, but I think I had something other 
than /dev/null before as the link-name while I tested what's needed. 
With /dev/null it works. Perhaps it's some oddness of the capiplugin. 
 
Comment 82 Alin Năstac (RETIRED) gentoo-dev 2005-11-01 21:14:21 UTC
*** Bug 111196 has been marked as a duplicate of this bug. ***
Comment 83 Jesus de Santos Garcia 2005-11-02 14:22:31 UTC
Coming from Bug 111196.

With the current stable version, i'm forced to use the updetach to avoid the
problem described in that bug (basically, the pppd process is not killed properly).

I want to avoid this bug without using updetach (I don't like to have the system
halted until my isp connection comes back). In this situacion, something like
killall pppd will work, but i think it is too aggressive to use this in a
generic script.

Is this problem solved in the current ebuild? I will try it as soon as possible.
Comment 84 Alin Năstac (RETIRED) gentoo-dev 2005-11-02 22:03:34 UTC
killall pppd isn't an acceptable solution.

the only way to avoid updetach is to set an on-demand connection (see attached
net.example).
Comment 85 Henrik Brix Andersen 2005-11-03 04:08:36 UTC
(In reply to comment #75)
> you could require link_${iface} only for pppoe, but I wonder how many bugs will
> be filled because users forget to set the link in command line. this module was
> created for making the life easier for its users and to make them dump that
> rp-pppoe (I'm still amazed why we adopted that bunch of bash scripts when we
> could write our own).

Right. I've just switched my dial-up profiles from using
/etc/ppp/options.${iface} to being fully defined in /etc/conf.d/net. I hadn't
seen attachment #62505 [details] back when I complained about the required link_${iface}
var, my fault.

In other words, the ppp rcscript network module (as found in
sys-apps/baselayout-1.12.0_pre9-r1) does the trick here; good job. :)
Comment 86 Jesus de Santos Garcia 2005-11-03 17:51:18 UTC
(In reply to comment #84)
>killall pppd isn't an acceptable solution.
>the only way to avoid updetach is to set an on-demand connection (see attached
>net.example).

I know killall is not an acceptable solution. But to me, the good solution would
be to obtain manually the pid of the pppd process in start and use it to kill in
the stop. Waiting for pppd to write the ppp0.pid file is the root of the problem
i'm describing.
Comment 87 Roy Marples (RETIRED) gentoo-dev 2005-11-07 03:04:11 UTC
I've now committed the documentation (modified to match our style) into net.example

This bug can be closed when baselayout-1.12.0_pre10 is released :)
Comment 88 Roy Marples (RETIRED) gentoo-dev 2005-11-08 08:52:09 UTC
baselayout-1.12.0_pre10 is released - so this bug is FIXED

Please open new bugs for futher issues
Comment 89 Gabriel Devenyi 2005-11-08 08:57:10 UTC
When is the stable release of baselayout-1.12.0 expected?
Comment 90 Roy Marples (RETIRED) gentoo-dev 2005-11-08 09:10:28 UTC
(In reply to comment #88)
> When is the stable release of baselayout-1.12.0 expected?

How long is a piece of string? heh

From my perspective it IS stable and has been for some time now.
From others, it's probably bug ridden.

If no bugs crop up, or minor issues that we can fix with minor patches then
we'll probably go stable mid December. Remember, 30 days have to pass without
serious issue before we even consider going stable.

Even then we think twice!

You want 1.12.0_pre10 to go stable faster? Then test it as much as you can on as
many boxes as you can and make bug reports.
Comment 91 Alin Năstac (RETIRED) gentoo-dev 2005-11-08 13:54:55 UTC
(In reply to comment #85)
> ... But to me, the good solution would
> be to obtain manually the pid of the pppd process in start and use it to kill in
> the stop. Waiting for pppd to write the ppp0.pid file is the root of the problem
> i'm describing.

for "normal" links, pppd starts ppp0 interface after the initial negociation,
therefore pid.ppp0 couldn't exist if the link hasn't been brought up yet.

for on-demand links, pppd initialize ppp0 with phoney IP settings and waits for
trafic on this interface, which will trigger the real connection. since ppp0.pid
is created at the same time with ppp0 interface, the pid file will be there the
very next moment after running pppd.

a generic solution to your problem would be to use "linkname" parameter for this
scope (/var/run/ppp-${linkname}.pid is created before ppp interface startup).
Roy, are you willing to accept patches? :)
Comment 92 Roy Marples (RETIRED) gentoo-dev 2005-11-08 23:08:48 UTC
(In reply to comment #90)
> a generic solution to your problem would be to use "linkname" parameter for this
> scope (/var/run/ppp-${linkname}.pid is created before ppp interface startup).
> Roy, are you willing to accept patches? :)

Yes, and it's a good solution as I recall you tested that pppd bails with an
error if the specified linkname is already in use ...
Comment 93 Alin Năstac (RETIRED) gentoo-dev 2005-11-10 00:35:04 UTC
the promised patches have been submitted in bug #112049
Comment 94 Gabriel Devenyi 2006-02-16 08:27:48 UTC
Is this module suitable for manually adding to baselayout-1.11? If so, which files need to be taken from baselayout 1.12 in order to make this work?
Comment 95 Roy Marples (RETIRED) gentoo-dev 2006-02-16 08:33:53 UTC
(In reply to comment #93)
> Is this module suitable for manually adding to baselayout-1.11?

No