From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 31 16:51:44 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 5276116A41B for ; Fri, 31 Aug 2007 16:51:44 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from plato.miralink.com (mail.miralink.com [70.103.185.20]) by mx1.freebsd.org (Postfix) with ESMTP id 2BA3B13C442 for ; Fri, 31 Aug 2007 16:51:44 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from localhost (localhost.localdomain [127.0.0.1]) by plato.miralink.com (Postfix) with ESMTP id 7C4EA61A431 for ; Fri, 31 Aug 2007 09:51:24 -0700 (PDT) Received: from plato.miralink.com ([127.0.0.1]) by localhost (plato.miralink.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01587-10 for ; Fri, 31 Aug 2007 09:51:23 -0700 (PDT) Received: from [10.0.0.40] (iago.office.miralink.com [10.0.0.40]) by plato.miralink.com (Postfix) with ESMTP id C4D15619CFB for ; Fri, 31 Aug 2007 09:51:23 -0700 (PDT) Message-ID: <46D8470B.9030304@miralink.com> Date: Fri, 31 Aug 2007 09:51:23 -0700 From: Sean Bruno User-Agent: Thunderbird 1.5.0.12 (X11/20070719) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <46D84609.3080409@miralink.com> <46D84697.800@fsck.ch> In-Reply-To: <46D84697.800@fsck.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Fri Aug 31 09:51:24 2007 X-DSPAM-Confidence: 0.9997 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 46d8470c29031542430122 X-DSPAM-Factors: 27, X-Virus-Scanned: amavisd-new at X-Spam-Status: No, score=-4.499 tagged_above=-10 required=6.6 autolearn=ham tests=[ALL_TRUSTED=-1.8, BAYES_00=-2.599, DSPAM_HAM=-0.1] X-Spam-Score: -4.499 X-Spam-Level: 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 16:51:44 -0000 Tobias Roth wrote: > 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. >> >> I would have expected that rc would be able to invoke the stop routines >> if a utility is disabled, but apparently the check for enabled/disabled >> occurs much too early in the rc handling functions for the stop to fire >> off. >> I could investigate further, as I am sure that it's a fairly easy fix to >> allow the stop functions to be invoked regardless of the enable/disable >> state. >> Does it make sense to anyone else that the rc functions should be able >> to shutdown a process when it has been disabled in rc.conf? >> > > /etc/rc.d/ntpd forcestop > Indeed one could invoke that. My question is more about what 'stop' should or should not do. Specifically, should it 'stop' when a process has been disabled? Sean