Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Aug 2011 15:16:32 -0700
From:      Xin LI <delphij@gmail.com>
To:        Jilles Tjoelker <jilles@stack.nl>
Cc:        freebsd-rc@freebsd.org
Subject:   Re: [PATCH] Don't test if a service is enabled when it's required
Message-ID:  <CAGMYy3u25PA0faZzScnTmJMRfWUHx6DCpFKY7TYg_AukcYgH3w@mail.gmail.com>
In-Reply-To: <20110821132045.GA3940@stack.nl>
References:  <4E50B5E3.90702@delphij.net> <20110821132045.GA3940@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Aug 21, 2011 at 6:20 AM, Jilles Tjoelker <jilles@stack.nl> 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 <delphij@delphij.net> https://www.delphij.net/
FreeBSD - The Power to Serve! Live free or die



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGMYy3u25PA0faZzScnTmJMRfWUHx6DCpFKY7TYg_AukcYgH3w>