Your initial use case explanation was the reason I made this change. See we do
listen to our users, thanks :-)

-----Original Message-----
From: "nusenu" <nus...@openmailbox.org>
Sent: ‎7/‎21/‎2015 23:19
To: "misc@openbsd.org" <misc@openbsd.org>
Cc: "Antoine Jacoutot" <ajacou...@bsdfrog.org>
Subject: Re: bug in rc.subr: kills more than it should (patch)

>>> imagine you have N services named:
>>>
>>> service service1 service2 ...
>>>
>>> or a ab abc ...
>>>
>>> Now you want to stop 'service' and you run: 'rcctl stop
>>> service'
>>>
>>> all (not just one) of them are gone?
>>>
>>>
>>> rc.subr invokes pkill and does a "startswith" match but does
>>> not require a perfect/complete match.
>>>
>>> What do you think about this patch to require a perfect match
>>> when sending invoking pkill/pgrep?
> Won't work. Carefully read pgrep(1) again.
>


I'm glad someone changed his opinion on this. :)

http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/etc/rc.d/rc.subr.diff?r1=1.98&r2
=1.99

http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/net/tor/pkg/tor.rc?rev=1.4&con
tent-type=text/x-cvsweb-markup

http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/net/tor/pkg/tor.rc?rev=1.4&con
tent-type=text/x-cvsweb-markup

"
By default, require an exact match of the process name and argument list.
This allows running several instances of the same rc.d(8) script by just
linking it to different name.
e.g.
ln -s ftpproxy ftpproxy6
echo 'ftpproxy6_flags=-6' >>/etc/rc.conf.local

This is likely to break some rc.d scripts in ports. I will try and fix
them all
in the next few days but I'd appreciate reports if I missed some.
"


...and yes, that was exactly my use case ;)
I'm also linking tor's rc script multiple times + custom flags.

https://github.com/nusenu/ansible-relayor/blob/master/tasks/configure.yml#L13
8

[demime 1.01d removed an attachment of type application/pgp-signature which
had a name of signature.asc]

Reply via email to