From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 31 19:15:12 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC5CF16A418 for ; Fri, 31 Aug 2007 19:15:12 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213]) by mx1.freebsd.org (Postfix) with ESMTP id 7736513C4A6 for ; Fri, 31 Aug 2007 19:15:12 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-31-60.bredband.comhem.se ([83.253.31.60]:59197 helo=falcon.midgard.homeip.net) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.66) (envelope-from ) id 1IRBxG-0004qS-6u for freebsd-hackers@freebsd.org; Fri, 31 Aug 2007 21:14:54 +0200 Received: (qmail 7515 invoked from network); 31 Aug 2007 21:14:29 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 31 Aug 2007 21:14:29 +0200 Received: (qmail 63900 invoked by uid 1001); 31 Aug 2007 21:14:29 +0200 Date: Fri, 31 Aug 2007 21:14:29 +0200 From: Erik Trulsson To: Doug Barton Message-ID: <20070831191429.GA63829@owl.midgard.homeip.net> Mail-Followup-To: Doug Barton , Sean Bruno , freebsd-hackers@freebsd.org References: <46D84609.3080409@miralink.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) X-Originating-IP: 83.253.31.60 X-Scan-Result: No virus found in message 1IRBxG-0004qS-6u. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1IRBxG-0004qS-6u 3d0bbc62b002115e08807f6586d23a70 Cc: Sean Bruno , freebsd-hackers@freebsd.org Subject: Re: rc functions don't allow processes to shutdown X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2007 19:15:13 -0000 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. -- Erik Trulsson ertr1013@student.uu.se