From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 31 21:16:54 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 1A8F216A418 for ; Fri, 31 Aug 2007 21:16:54 +0000 (UTC) (envelope-from mail@maxlor.com) Received: from popeye1.ggamaur.net (popeye1.ggamaur.net [213.160.40.50]) by mx1.freebsd.org (Postfix) with ESMTP id 64DA913C46B for ; Fri, 31 Aug 2007 21:16:53 +0000 (UTC) (envelope-from mail@maxlor.com) Received: from maxlor.mine.nu (c-82-192-240-247.customer.ggaweb.ch [82.192.240.247]) by popeye1.ggamaur.net (8.13.7/8.13.7/Submit) with ESMTP id l7VKjiQv038434; Fri, 31 Aug 2007 22:45:45 +0200 (CEST) (envelope-from mail@maxlor.com) Received: from localhost (unknown [127.0.0.1]) by maxlor.mine.nu (Postfix) with ESMTP id 200052E26F; Fri, 31 Aug 2007 22:45:39 +0200 (CEST) X-Virus-Scanned: amavisd-new at atlantis.intranet Received: from maxlor.mine.nu ([127.0.0.1]) by localhost (atlantis.intranet [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AcDaMbjSrc56; Fri, 31 Aug 2007 22:45:38 +0200 (CEST) Received: from mini.intranet (mini.intranet [10.0.0.17]) by maxlor.mine.nu (Postfix) with ESMTP id D9DBB2E26E; Fri, 31 Aug 2007 22:45:38 +0200 (CEST) From: Benjamin Lutz To: freebsd-hackers@freebsd.org Date: Fri, 31 Aug 2007 22:45:35 +0200 User-Agent: KMail/1.9.7 References: <46D84609.3080409@miralink.com> <46D84697.800@fsck.ch> <46D8470B.9030304@miralink.com> In-Reply-To: <46D8470B.9030304@miralink.com> X-Face: $Ov27?7*N,h60fIEfNJdb!m,@#4T/d; 1hw|W0zvsHM(a$Yn6BYQ0^SEEXvi8>D`|V*F"=?utf-8?q?=5F+=0A=09R2?=@Aq>+mNb4`,'[[%z9v0Fa~]AD1}xQO3|>b.z&}l#R-_(P`?@Mz"kS; XC>Eti,i3>%@=?utf-8?q?g=3F=0A=094f?=,\c7|Ghwb&ky$b2PJ^\0b83NkLsFKv|smL/cI4UD%Tu8alAD MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1848841.mkgRyaegMq"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200708312245.38607.mail@maxlor.com> X-Scanned-By: MIMEDefang 2.62 on 213.160.40.60 Cc: Sean Bruno 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 21:16:54 -0000 --nextPart1848841.mkgRyaegMq Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 31 August 2007 18:51:23 Sean Bruno wrote: > Tobias Roth wrote: > > Sean Bruno wrote: > >> I noticed that if rc.conf has ntpd_enable=3D"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? Consider this: all init scripts are called with stop on shutdown. If=20 stop always does something, then you'll have many init scripts trying=20 to stop processes that aren't actually running. While this shouldn't hurt the system too much, other than slightly=20 slowing down a shutdown, it doesn't feel like clean design to me. Nor=20 would adding an rc.d-internal-stop. forcestop is a good solution for this issue imo. Cheers Benjamin --nextPart1848841.mkgRyaegMq Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBG2H3vzZEjpyKHuQwRAkxrAKCj+ioyyFR/7V4MIgAGBiEjv4VcDgCeL0zT wT2kraQdwID4jD76DXaWeHQ= =LAEx -----END PGP SIGNATURE----- --nextPart1848841.mkgRyaegMq--