Description of problem: When a ppp connection is brought up ONBOOT, ppp-watch doesn't keep running. Version-Release number of selected component (if applicable): initscripts-8.45.5-1.i386.rpm How reproducible: Completely Steps to Reproduce: 1. Set up a ppp connection. Set it to come up ONBOOT. Test the connection to make sure it works. Note that ppp-watch is running. 2. Reboot the machine. Note that pppd is running, but ppp-watch isn't. This means ifdown ppp0 won't work. You have to kill pppd by hand. Actual results: On boot, ppp0 comes up, but ppp-watch isn't running. Expected results: ppp-watch should be running. Additional info: I don't have a ppp-watch pid file in /var/run, so ppp-watch is either not making it, or exiting nicely. I put extra logging into ifup-ppp to see if the call order is right, and it is...ifup-ppp does call ppp-watch, which calls ifup-ppp again. That's working. Somewhere along the way, ppp-watch goes away.
I've been staring at the ppp-watch code and found something interesting. If you pass ppp-watch the boot parameter, it sets an alarm signal, which should make it time-out after a configurable amount of time. This is interesting, because that alarm is never canceled, and there's no way to miss it. Which means, if called on-boot, ppp-watch will always end up dying. Even if the pppd connection is working just fine, ppp-watch will end up going away. Is this by design?
It's certainly always been that way; as that's been 7+ years, unsure whether it's by design or by history.
Does that behavior seem to be correct? It isn't for my purposes, but I can recompile ppp-watch to fix it. I'm staring at the code now, trying to find the right place to put alert(0) in if (boot) once the connection's successfully made. When I figure that out, I'll update the ticket here.
Created attachment 145581 [details] potential patch Does the attached help? Unfortunately, I'm not in a position where I can test this at the moment.
That's about what I was going to do. I may wrap it in code to only run if we're in boot mode (because that's the only way alarm could have been set). I will test and confirm that this works, and attach my patch (which will be the same as yours, just with an extra if clause). More later.
Shouldn't need the 'if' - alarm(0) is ignored if no prior alarm is set.
OK, I applied the patch as written (without the check for boot) and it worked. My patched FC6 box booted with a ppp connection set up ONBOOT, and the corresponding ppp-watch program is still running. Great! This allows ifdown to work much more smoothly. Confirmed: the patch fixes the problem.
Added in CVS, will be in 8.50-1. May appear in a future FC6 update.