From owner-freebsd-rc@FreeBSD.ORG Fri Mar 26 20:03:46 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 B5888106564A for ; Fri, 26 Mar 2010 20:03:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8965D8FC15 for ; Fri, 26 Mar 2010 20:03:46 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 2ED6246B37; Fri, 26 Mar 2010 16:03:46 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 332F68A01F; Fri, 26 Mar 2010 16:03:45 -0400 (EDT) From: John Baldwin To: Xin LI Date: Fri, 26 Mar 2010 15:57:28 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003261410.35830.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003261557.28279.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 26 Mar 2010 16:03:45 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.7 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-rc@freebsd.org 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: Fri, 26 Mar 2010 20:03:46 -0000 On Friday 26 March 2010 3:18:00 pm 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): > > 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" Hmm, that might work. I think you can drop the stdio redirection for checkyesno as other parts of this script don't do that when invoking checkyesno. -- John Baldwin