From owner-freebsd-rc@FreeBSD.ORG Sat Mar 27 20:18:05 2010 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 0508B1065670 for ; Sat, 27 Mar 2010 20:18:05 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 9D1E78FC12 for ; Sat, 27 Mar 2010 20:18:04 +0000 (UTC) Received: (qmail 16641 invoked by uid 399); 27 Mar 2010 20:18:03 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 27 Mar 2010 20:18:03 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4BAE67FA.6070609@FreeBSD.org> Date: Sat, 27 Mar 2010 13:18:02 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.7) Gecko/20100218 Thunderbird/3.0.1 MIME-Version: 1.0 To: Xin LI References: <201003261410.35830.jhb@freebsd.org> In-Reply-To: X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@freebsd.org, John Baldwin Subject: Re: mountd and reload 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: Sat, 27 Mar 2010 20:18:05 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 On 03/26/10 12:18, Xin LI wrote: > On Fri, Mar 26, 2010 at 11:10 AM, John Baldwin wrote: >> FYI, it would be nice if someone could fix it so that /etc/rc.d/mountd reload >> works when nfs_server_enable="YES" is set in /etc/rc.conf but >> mountd_enable="YES" is not explicitly set. > > How would you think about something like this (hackish, though... I > think we should perhaps make a 'rcvars' list): I am opposed to it. We already have a mechanism for starting things that don't have _enable set. OTOH I agree that there is a more general problem that our rc.d system should be smarter about what dependent services need to be enabled for a given service but that problem should be solved generally. One-off hacks like this will create a lot of drama and confusion that I would really prefer to avoid. Doug > Index: mountd > =================================================================== > --- mountd (revision 205651) > +++ mountd (working copy) > @@ -10,7 +10,15 @@ > . /etc/rc.subr > > name="mountd" > -rcvar=`set_rcvar` > +if ! checkyesno mountd_enable 1>/dev/null 2>&1 ; then > + if ! checkyesno nfsd_enable 1>/dev/null 2>&1; then > + rcvar=nfs_server_enable > + else > + rcvar=nfsd_enable > + fi > +else > + rcvar=`set_rcvar` > +fi > command="/usr/sbin/${name}" > pidfile="/var/run/${name}.pid" > required_files="/etc/exports" > > Cheers, - -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEAREDAAYFAkuuZ/oACgkQyIakK9Wy8Pt17ACeJUdrNgHDeJmaKw70LGPhPA1D VVEAn2Fv8i5DX+tO2hvBNnT/0Gn08UFi =qfVe -----END PGP SIGNATURE-----