Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Aug 2007 21:14:29 +0200
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        Sean Bruno <sbruno@miralink.com>, freebsd-hackers@freebsd.org
Subject:   Re: rc functions don't allow processes to shutdown
Message-ID:  <20070831191429.GA63829@owl.midgard.homeip.net>
In-Reply-To: <alpine.BSF.0.999.0708311005210.72038@qbhto.arg>
References:  <46D84609.3080409@miralink.com> <alpine.BSF.0.999.0708311005210.72038@qbhto.arg>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 31, 2007 at 10:09:52AM -0700, Doug Barton wrote:
> On Fri, 31 Aug 2007, Sean Bruno wrote:
> 
>> I noticed that if rc.conf has ntpd_enable="NO", an invocation of 
>> /etc/rc.d/ntpd stop won't actually shut down ntpd.  I checked a couple of 
>> other processes(like net-snmp) and noted the same behavior.
> 
> FYI, there is a list for discussing rc.d issues, freebsd-rc@. The current 
> behavior is by design, and I don't think that changing it is a good idea 
> this late in the game.
> 
> Assuming that lack of an affirmative _enable variable is a constant, the 
> only way that a service can be started is with either onestart or 
> forcestart. The symmetry here would be to stop it the same way.
> 
>> I would have expected that rc would be able to invoke the stop routines if 
>> a utility is disabled,
> 
> It can invoke them, in the same way that the start routines can be invoked 
> if a service is not enabled, by prepending one or force to stop.
> 
> Looking at this from the other direction, what would be the benefit to 
> having plain stop act in the absence of an _enable variable for that 
> service?

The times I have noticed that stop does not work without an _enable variable
has been when I wished to stop running some service.  First I edited rc.conf
to remove the _enable line (to make sure the service did not start the next
time I restarted the computer) and then I tried to stop the service using
the normal 'stop' invocation.  This of course did not work which was very
annoying.  (The above is IMO the proper order to do this - if it worked.)

There has been several times when I have been annoyed by the fact that stop
needs the _enable variable to be set.  There has never been any occasion
when I have been happy about this fact.



-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070831191429.GA63829>