PDA

View Full Version : Running pppd from init


jeremy
11-12-2003, 11:10 PM
With both persist enabled and maxfail set to 0, I noticed that pppd still manages to exit. So thought I'd it it a go, running pppd from init. In /etc/inittab I have:
p0:23:respawn:/usr/sbin/pppd call dsl-provider nodetach

Additionally, just to be safe in /etc/ppp/peers/dsl-provider I added the following option:
connect "/sbin/ifconfig eth0 up"

It appears to work though not sure how it'll go on system bootup. Anyone else done anything like this? Any potential problems that I may face?

I also have a 'tail file' script sitting around as well incase I ever need it. Back in the dark ages (iPrimus $115 unlimited 1500/256 plan when I had my dad to pay for it), I noticed I had problems where pppd would be continually trying to connect but not getting anywhere and killing it then restarting it would fix it. I haven't encountered this with Swiftel yet though. The otherthing is, if such a thing does occur I could just set maxfail low and init will respawn pppd.

oshan
12-12-2003, 08:20 AM
the only prblems i have had doing this from init are when the connection drops and init does not realise pppd has and does not restart it. I ended up running a script i wrote from init that checked the current state. if dead, killed and restarted it, if not running (on boot) started it.

my 2 cents

jeremy
12-12-2003, 09:52 AM
Hmmmm init should respawn pppd as long as pppd actually exits/dies. Are you referring to when the connection dies but pppd doesn't and isn't able to bring the link back up? Maybe setting maxfail would help in this instance.