From owner-freebsd-rc@FreeBSD.ORG Sun Aug 21 22:39:37 2011 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 300781065673 for ; Sun, 21 Aug 2011 22:39:37 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id E77058FC0C for ; Sun, 21 Aug 2011 22:39:36 +0000 (UTC) Received: by ywo32 with SMTP id 32so3560330ywo.13 for ; Sun, 21 Aug 2011 15:39:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=R6q8CYhFMt+SUgIlbNL1jp/wDXwYAaYK75hw40Lz2Lc=; b=UImsbxxbz04Z/BQc0SVkrqNeibo8VwwrZzt7aRB0fTt4UZr5AA5+PO8Y4JHxQxGvQq jh8YYfg4T7eSbR2vX9379T1RhTmY4lh9cZPO+bo13ozAu5qkaLOkJxTgGrOW5gwUSrqE GPX9Hve+GpBWIJbaJE7Qtf9GA5x1oYEa9708s= MIME-Version: 1.0 Received: by 10.150.115.7 with SMTP id n7mr1698833ybc.221.1313964992081; Sun, 21 Aug 2011 15:16:32 -0700 (PDT) Received: by 10.150.136.11 with HTTP; Sun, 21 Aug 2011 15:16:32 -0700 (PDT) In-Reply-To: <20110821132045.GA3940@stack.nl> References: <4E50B5E3.90702@delphij.net> <20110821132045.GA3940@stack.nl> Date: Sun, 21 Aug 2011 15:16:32 -0700 Message-ID: From: Xin LI To: Jilles Tjoelker Content-Type: text/plain; charset=UTF-8 Cc: freebsd-rc@freebsd.org Subject: Re: [PATCH] Don't test if a service is enabled when it's required 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, 21 Aug 2011 22:39:37 -0000 On Sun, Aug 21, 2011 at 6:20 AM, Jilles Tjoelker wrote: [snip] > I don't like that this adds a bunch of unnecessary checks to the boot. > If we are booting and the appropriate variable is set, the service is > running and it is not necessary to check for a process (unless it > failed, in which case there is little point in trying again). Calling > checkyesno is much faster than checking status (which forks several > times and reads ps output byte-by-byte with the read builtin). That's good point but isn't the whole point of having forced dependencies to ease use? (For instance, if nfsd requires mountd to be started, why it starts mountd for user when _enabled="NO" and not when _enabled="YES"? I think starting anyway makes more sense...) I'll take a look at whether we can make the 'fast' path skip these checks, e.g. change these checks against _enabled to check rc_fast instead, do you think that would be more sensible solution for this? Cheers, -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die