Trivial PR, fix shutdown of rc services started with onestart (fwd)

Doug Barton dougb at FreeBSD.org
Thu Apr 15 21:30:28 UTC 2010


On 04/15/10 01:28, Matthew Seaman wrote:
> On 14/04/2010 22:06:20, Dominic Fandrey wrote:
>> I'm running with variations of this for more than a year and not once
>> have I been able to detect unwanted side effects.
>> However, I can assure you it has spared me a lot of problems.
> 
> There were some rc scrips in /etc/rc.d that always did the 'start'
> action no matter what argument they were called with. 

This change will only matter if there is an actual process that is
running. For things in the base there is an _enable default in
/etc/defaults/rc.conf for each item. If the user did 'onestart' or
'forcestart' to start the process/service even though _enable is NO,
this change will allow it to be shut down cleanly.

> I think all of
> those have been fixed to recognize a 'stop' argument now, but whether
> this also applies to a 'onestop' I can't tell. 

As someone else already answered, the 'one' or 'force' prepends are
converted to internal flags for rc.subr, the argument passed to the
script does not contain them.

> /etc/rc.d/tmp is an
> example -- notice that the script action isn't encapsulated as a
> tmp_start function.

That's a bug that should be fixed, but it's orthogonal to this issue.


Doug

-- 

	... and that's just a little bit of history repeating.
			-- Propellerheads

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/



More information about the freebsd-rc mailing list