From owner-freebsd-current@FreeBSD.ORG Wed Jul 16 20:35:07 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C92521065766 for ; Wed, 16 Jul 2008 20:35:07 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 6F6398FC2B for ; Wed, 16 Jul 2008 20:35:07 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.2) with ESMTP id m6GKIL2T008428 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 16 Jul 2008 15:18:21 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.2/Submit) id m6GKIKBU008392; Wed, 16 Jul 2008 15:18:20 -0500 (CDT) (envelope-from dan) Date: Wed, 16 Jul 2008 15:18:20 -0500 From: Dan Nelson To: Doug Barton Message-ID: <20080716201819.GB19044@dan.emsphone.com> References: <487E533F.7050303@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <487E533F.7050303@FreeBSD.org> X-OS: FreeBSD 7.0-STABLE User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-current@freebsd.org Subject: Re: Heads Up: shutdown keyword added to 34 rc.d scripts. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2008 20:35:07 -0000 In the last episode (Jul 16), Doug Barton said: > I've run with this locally for quite a while and just haven't had a > chance to commit it. OTOH I don't use most of the stuff covered by > this, so I'd like to get it tested in real world conditions for a > while before it's MFC'ed. > > URL: http://svn.freebsd.org/changeset/base/180564 > Log: > ~ Add the shutdown KEYWORD to those scripts that start persistent > ~ services to allow them to do a "clean" shutdown. > > ~ I purposely avoided making changes to network-related stuff since > ~ the system shutting down is pretty conclusive, and there may be > ~ complicated dependencies on the network that I would rather not try > ~ to unravel. I think shutdown should be reserved for programs that save state between instances or otherwise would cause a "cleanup" operation to run then next time they are started after an unclean shutdown. Adding shutdown to things like amd, mountd, moused, etc. simply forces what would be done in init's final SIGTERM sweep to be done sequentially instead of in parallel. Also, if any of those daemons doesn't want to immediately exit for some reason (amd hanging on a stuck mountpoint, for example), it increases the likelyhood of the global shutdown timer expiring and force-killing other daemons that might have wanted the chance to shut down cleanly. -- Dan Nelson dnelson@allantgroup.com