Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jun 2011 10:24:15 -0700
From:      Garrett Cooper <yanegomi@gmail.com>
To:        Chris Rees <utisoft@gmail.com>
Cc:        freebsd-current@freebsd.org, Doug Barton <dougb@freebsd.org>
Subject:   Re: rc.d script to load kernel modules
Message-ID:  <BANLkTi=9HjYCEMwo4QJfmgAADZTx3SbC3g@mail.gmail.com>
In-Reply-To: <BANLkTi=fvm3P2Bc4MG2tWwi%2BZL_dfo0Y7g@mail.gmail.com>
References:  <4DF3E98B.40108@FreeBSD.org> <20110612085649.GA11503@DataIX.net> <4DF50AA1.9080607@FreeBSD.org> <E1QW0VI-000Ohl-K4@kabab.cs.huji.ac.il> <4DF63972.8070006@freebsd.org> <BANLkTi=fvm3P2Bc4MG2tWwi%2BZL_dfo0Y7g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 13, 2011 at 10:00 AM, Chris Rees <utisoft@gmail.com> wrote:
> On 13 Jun 2011 17:24, "Julian Elischer" <julian@freebsd.org> wrote:
>>
>> On 6/12/11 11:20 PM, Daniel Braniss wrote:
>>>>
>>>> On 6/12/2011 1:56 AM, Jason Hellenthal wrote:
>>>>
>>>>> Cutting modules out of the kernel in general does help speed up booti=
ng
>>>>> but loading those same modules later in the boot process will just le=
ad
>>>>> you back to the same boot time.
>>>>
>>>> Loading modules via loader.conf is many times slower than doing it fro=
m
>>>> disk after the system is partially booted. (As in, 2-3 seconds per
>>>> module vs. nearly instantaneous for all 6.)
>>>>
>>>> I didn't offer my list as an example of what to do, I offered it as a
>>>> syntax example. I would of course expect people to use appropriate
>>>> discretion to load things in loader.conf that are necessary for boot.
>>>> (Of course, the fact that people can easily get this wrong is a strike
>>>> against the technique.)
>>>>
>>>> There is no point in having an _enable for this script because if the
>>>> kld_list is empty, nothing happens.
>>>>
>>> Doug's solution is what we have been using for a very long time!
>>>
>>> the loader.conf solution is not practical when it's shared among many
>>> hosts -like here where most of the hosts are dataless-, so, moving the
> not
>>> essential ones to rc.conf was the obvious solution.
>>
>>
>> what would be REALLY cool would be the ability to make loader.conf have
> some sort of conditional
>> clauses..
>>
>> e.g. if MAC=3D=3D 01:02:03:04:05:06
>> =A0 =A0 =A0 =A0 =A0blah
>>
>>
>
> Isn't it just a shell script?

    The values are eval'ed from Forth-code, not /bin/sh -- so it's not
a shell script in the way that you're generally used to :).
    But yes, it could be made conditional.
Thanks!
-Garrett



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