[PATCH] Don't test if a service is enabled when it's required

Xin LI delphij at gmail.com
Sun Aug 21 22:39:37 UTC 2011


On Sun, Aug 21, 2011 at 6:20 AM, Jilles Tjoelker <jilles at 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 at delphij.net> https://www.delphij.net/
FreeBSD - The Power to Serve! Live free or die


More information about the freebsd-rc mailing list