From owner-freebsd-rc@FreeBSD.ORG Fri Mar 26 19:45:31 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 647F91065670 for ; Fri, 26 Mar 2010 19:45:31 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3B4668FC17 for ; Fri, 26 Mar 2010 19:45:31 +0000 (UTC) Received: by pwj4 with SMTP id 4so7025601pwj.13 for ; Fri, 26 Mar 2010 12:45:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type; bh=lNAOeRDA9tKM4+hzT2AogzHNkqVkNYAF/maau5vaV/I=; b=j4ujh4F+cdtMQm0TAejoDJNKN5gIWlBGd9g621/66No70zof84rqYe9sLARkgIeLwy OkTmAIdGzpeyVL5ojLR08wuJEV9s7ZtgjxEhXg5F+zcUy1TonWcz5wjLlfmXQb8pbjP1 U5z6xrBGApmH69gCYziFyitS50nb3cFOVKs/w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=mS43aJoW6c7IbbiCeo5ss8U43GvxJGlTQOkZabGzjPBqXGXU0AprmZKgjNgNgOgr/P izwQ6gS2ONKF6LHb29rV6fEUiYX8aD2ScpIQC1IE/0Y97RyeBZ76/SEBYhq9jrzNoD91 ZH6B3fHfRwaPCaEi3ezcH7T9XkRK8enmlqQ+U= MIME-Version: 1.0 Received: by 10.140.127.14 with HTTP; Fri, 26 Mar 2010 12:18:00 -0700 (PDT) In-Reply-To: <201003261410.35830.jhb@freebsd.org> References: <201003261410.35830.jhb@freebsd.org> Date: Fri, 26 Mar 2010 12:18:00 -0700 Received: by 10.141.1.6 with SMTP id d6mr1452008rvi.175.1269631080173; Fri, 26 Mar 2010 12:18:00 -0700 (PDT) Message-ID: From: Xin LI To: John Baldwin Content-Type: text/plain; charset=UTF-8 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 19:45:31 -0000 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" Cheers, -- Xin LI http://www.delphij.net