| Summary: | "rc.d/ppp restart" stops all instances of ppp | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Nicolas Rachinsky <freebsd-pr> | ||||||
| Component: | bin | Assignee: | emax | ||||||
| Status: | Closed FIXED | ||||||||
| Severity: | Affects Only Me | ||||||||
| Priority: | Normal | ||||||||
| Version: | 6.2-PRERELEASE | ||||||||
| Hardware: | Any | ||||||||
| OS: | Any | ||||||||
| Attachments: |
|
||||||||
|
Description
Nicolas Rachinsky
2006-10-20 19:30:18 UTC
Responsible Changed From-To: freebsd-bugs->freebsd-rc Over to maintainer(s). Can you try the attached patch? It allows you to specify the ppp instance to control by specifying the tunnel device name as an addtional argument: # /etc/rc.d/ppp restart tun0 Cheers. -- Mike Makonnen | GPG-KEY: http://people.freebsd.org/~mtm/mtm.asc mmakonnen_at_gmail.com | AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 mtm_at_FreeBSD.Org | FreeBSD - http://www.freebsd.org * Mike Makonnen <mtm@FreeBSD.Org> [2007-03-31 13:49 +0300]: > +# usage: /etc/rc.d/ppp <cmd> [tunX] I haven't yet tried it, but I see one problem. AFAIK there is no mechanism to start more than one ppp with the current rc.d/ppp script via rc.conf. Thus I can't imagine how this can work if I do this with a tun device that does correspond to the ppp started via rc.d/ppp. And it will still terminate processes that are unrelated to the pp started via rc.d/ppp if it is used without the additional parameter. So I don't think, this can fix the real problem, that there is no way to identify the ppp instance that were started via rc.d/ppp. At least I see no such way. Do I miss something? Nicolas State Changed From-To: open->feedback I'll look into this. Patch has been worked up and awaiting response from Originator. Responsible Changed From-To: freebsd-rc->mtm I'll look into this. Patch has been worked up and awaiting response from Originator. On Sat, Mar 31, 2007 at 01:49:00PM +0200, Nicolas Rachinsky wrote: > * Mike Makonnen <mtm@FreeBSD.Org> [2007-03-31 13:49 +0300]: > > +# usage: /etc/rc.d/ppp <cmd> [tunX] > > I haven't yet tried it, but I see one problem. AFAIK there is no > mechanism to start more than one ppp with the current rc.d/ppp script > via rc.conf. Thus I can't imagine how this can work if I do this with > a tun device that does correspond to the ppp started via rc.d/ppp. Whether you can start more than one ppp with rc.d/ppp is immaterial. That's an issue for another PR(1) :-) If you start more than one ppp (however you started them), the patch gives you the option of stoping/restarting them selectively using rc.d/ppp by specifying the tunnel device. So, if you want to stop the ppp daemon associated with tun1, for example, without affecting tun0 you can now do that. > > And it will still terminate processes that are unrelated to the pp > started via rc.d/ppp if it is used without the additional parameter. > > So I don't think, this can fix the real problem, that there is no way > to identify the ppp instance that were started via rc.d/ppp. At least > I see no such way. Sorry, I should have included an explanation with the patch. As you say there's no easy or straight-forward way to determine which ppp was started with rc.d/ppp. The patch was a compromise to allow an admin to selectively stop/restart a ppp instance without terminating all others. Also, arguably, running rc.d/ppp stop without additional arguments *should* terminate *all* ppp instances. Cheers. -- Mike Makonnen | GPG-KEY: http://people.freebsd.org/~mtm/mtm.asc mmakonnen_at_gmail.com | AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 mtm_at_FreeBSD.Org | FreeBSD - http://www.freebsd.org * Mike Makonnen <mtm@FreeBSD.Org> [2007-03-31 15:46 +0300]: > If you start more than one ppp (however you started them), the patch gives > you the option of stoping/restarting them selectively using rc.d/ppp > by specifying the tunnel device. So, if you want to stop the ppp daemon > associated with tun1, for example, without affecting tun0 you can > now do that. Stopping does work, restarting not, it tries to start the ppp that is started by rc.d/ppp. Restarting the one started by rc.d/ppp does work. > As you say there's no easy or straight-forward way to determine > which ppp was started with rc.d/ppp. The patch was a compromise to > allow an admin to selectively stop/restart a ppp instance without > terminating all others. Also, arguably, running rc.d/ppp stop > without additional arguments *should* terminate *all* ppp instances. I can not agree with the last sentence. "rc.d/ppp stop" should stop everything started by "rc.d/ppp start" and nothing else. I think it is a POLA violation if "rc.d/ppp stop" stops every instance of ppp, even instances started by other users! Nicolas I think the following commit should fix this issue. It starts/stops based on the ppp profile. I've attached a patch relative to RELENG_6 to make it easier for you to try. ----- Forwarded message from Maksim Yevmenkin <emax@FreeBSD.org> ----- Date: Thu, 18 Oct 2007 17:10:40 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org From: Maksim Yevmenkin <emax@FreeBSD.org> Subject: cvs commit: src/etc/rc.d ppp Authentication-Results: mx.google.com; spf=pass (google.com: domain of owner-src-committers@freebsd.org designates 69.147.83.53 as permitted sender) smtp.mail=owner-src-committers@freebsd.org emax 2007-10-18 17:10:40 UTC FreeBSD src repository Modified files: etc/rc.d ppp Log: Teach /etc/rc.d/ppp how to start/stop individual instances of ppp. This is an extension of previous commit. Submitted by: Yuri Kurenkov < y dot kurenkov at init dot ru > Reviewed by: mtm MFC after: 3 days Revision Changes Path 1.15 +36 -3 src/etc/rc.d/ppp ----- End forwarded message ----- Cheers. -- Mike Makonnen | GPG-KEY: http://people.freebsd.org/~mtm/mtm.asc mmakonnen @ gmail.com | AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 mtm @ FreeBSD.Org | FreeBSD - http://www.freebsd.org Sorry, I forgot to attach the patch :( -- Mike Makonnen | GPG-KEY: http://people.freebsd.org/~mtm/mtm.asc mmakonnen @ gmail.com | AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 mtm @ FreeBSD.Org | FreeBSD - http://www.freebsd.org State Changed From-To: feedback->patched emax committed a patch that should address this, but it has not been MFCed to 6 yet. Responsible Changed From-To: mtm->emax State Changed From-To: patched->closed the patch was MFC'ed to RELENG_6. for whatever reason it does not show up in cvsweb. |