From owner-freebsd-rc@FreeBSD.ORG Sun Sep 30 10:25:17 2007 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A7B016A417 for ; Sun, 30 Sep 2007 10:25:17 +0000 (UTC) (envelope-from mmakonnen@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.183]) by mx1.freebsd.org (Postfix) with ESMTP id CC52013C45A for ; Sun, 30 Sep 2007 10:25:16 +0000 (UTC) (envelope-from mmakonnen@gmail.com) Received: by py-out-1112.google.com with SMTP id u77so6535713pyb for ; Sun, 30 Sep 2007 03:25:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=SqpdUVXvCrzBSzX9eKPW9iJRnzq7QHC65GKyGYaNL+A=; b=sFWtz4tdhe9R3jagGSXIST6OS7JibYD8BjppjxEO6lFuoH4MjkNsOiTYabXDlxSGa6bumZYDiDt8YHuT93sAYFJZvBRXR0l/1EVa1MBiW2Vlcbehv4jj6jgRnePgm+/5kNnnKMSUguBKlixHGP3a1ARFYyHeNVpPOqIC6dj2R3I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=scNvN03rcqlwS7vj5VLXO1jFpzhHV7lBJjzp6bO2i/zBhHfw4//sBfBCaaaDhNdvSIQj/Um6lyZMumVnhogBI5IXVAsExJp1h2txI3urd+/lJ4uff0eMeaJQz6NnNnTv+JfPN+cWG/tlT44nm4UauxOhugpAnikyVn9IOVvWqNo= Received: by 10.65.124.8 with SMTP id b8mr390154qbn.1191146414820; Sun, 30 Sep 2007 03:00:14 -0700 (PDT) Received: by 10.65.239.20 with HTTP; Sun, 30 Sep 2007 03:00:14 -0700 (PDT) Message-ID: <584bfc3f0709300300s22f2606w3f2628edc1aa15f@mail.gmail.com> Date: Sun, 30 Sep 2007 13:00:14 +0300 From: "Mike Telahun Makonnen" To: "Doug Barton" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: freebsd-rc@freebsd.org Subject: Re: rc.d cleanup patch redux X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2007 10:25:17 -0000 On 9/23/07, Doug Barton wrote: > > 1. Remove "Deprecated variable name support" from rc.subr that was > supposed to be done after 6.x branched, but didn't get done (substantially > my fault). > > 2. Remove $NetBSD$ tags from all the rc.d files, since they aren't really > relevant any longer, and the information will be in CVS anyway. I'm > leaving it in rc.subr since we still occasionally pull stuff over in that > file. > > 3. Remove the comment from named_flags, to match all the other empty > _flags variables *grumble* I don't understand what the purpose of all those empty foo_flags="" variables is. Maybe for 8-CURRENT we can get rid of them from etc/defaults/rc.conf? > > 4. s/bootparams/bootparamd/g to match the convention of having $name, > PROVIDE, and file name match. I did check to make sure this script isn't > called from anywhere else, but if anyone is actually using it that would > be great feedback. > Sounds good. Although for 8-CURRENT we might want to go through all the other scripts that don't follow this convention and fix thouse up as well (the rpc* daemons come to mind). > 5. Add the shutdown KEYWORD to all the scripts that start persistent > services. I'm not sure why this was never done in the past, but I think it > should be done, since it allows the possibility of a clean(er) shutdown. I > left out network, routing, and kerberos stuff from this pass, since I > don't use kerberos and I'm not sure what effect this would have, and > routing (including firewall stuff) can go down last as it does now. > I'm not sure about the usefullness of these. If all the daemon needs is a simple kill -TERM, then I believe init already takes care of this. A script should make use of the shutdown keyword only if it needs to do additional processing. For example, rc.d/amd doesn't do anything special on shutdown. It just lets rc.subr(8) glue send a -TERM signal. The only benefit I see to adding the shutdown keyword to these kinds of scripts is that the shutdown occurs in reverse order of startup (as opposed to init just killing them off all at once after rc.shutdown). This change only adds aditional processing during shutdown without any real benefit. Also, rc.d/apm doesn't start any persistent daemons. It simply enables and disables the apm funtions. So, I don't think it needs to be run at shutdown time. Cheers, Mike.