From owner-freebsd-current@FreeBSD.ORG Mon Jun 13 18:38:03 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BEBE106566B; Mon, 13 Jun 2011 18:38:02 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id D2E368FC0A; Mon, 13 Jun 2011 18:38:01 +0000 (UTC) Received: by vws18 with SMTP id 18so5575323vws.13 for ; Mon, 13 Jun 2011 11:38:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=HpITbTt/JqPjMgItYi2NuHlkaVPoJkMt2hYo3oezcEE=; b=CRxo15bAu9uRUjTxk5EIqefCaqJx16Twd3ML1GbEqNL1DGQQ4QrA+ZfONnTFlIjSo6 A8Ew9huPMsWGUv6oHUKmdUqKQ6CpJ8idh8LSXxzjoOJvM75oKX05Xfk2wLdJl1nnlpew WC1QcMaUO9f5WsKI5cIVMD1FEdFh0X9EwC31o= 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:content-transfer-encoding; b=JjXXva1dsMN3GGT3Ll+RcPtx3CMk22mDa7qg6p8AK8og8FIOXFeTBoZacEXFaXHClc 1LhiOfH5zAuEIrBvBtXHuQyrIILNsjWRiI9WjUMI8ybxzpejCWFAONCuIojfm+jPGuW4 TNnMWsGyMqQNKEHurTFZWUmNeAyqLs6nLkGdE= MIME-Version: 1.0 Received: by 10.220.187.76 with SMTP id cv12mr2190141vcb.128.1307990280665; Mon, 13 Jun 2011 11:38:00 -0700 (PDT) Received: by 10.220.189.202 with HTTP; Mon, 13 Jun 2011 11:38:00 -0700 (PDT) In-Reply-To: References: <4DF3E98B.40108@FreeBSD.org> <20110612085649.GA11503@DataIX.net> <4DF50AA1.9080607@FreeBSD.org> <4DF63972.8070006@freebsd.org> Date: Mon, 13 Jun 2011 11:38:00 -0700 Message-ID: From: Garrett Cooper To: Chris Rees Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Doug Barton , freebsd-current@freebsd.org Subject: Re: rc.d script to load kernel modules X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2011 18:38:03 -0000 On Mon, Jun 13, 2011 at 10:40 AM, Chris Rees wrote: > > On 13 Jun 2011 18:24, "Garrett Cooper" wrote: >> >> On Mon, Jun 13, 2011 at 10:00 AM, Chris Rees wrote: >> > On 13 Jun 2011 17:24, "Julian Elischer" 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 >> >>>>> booting >> >>>>> but loading those same modules later in the boot process will just >> >>>>> lead >> >>>>> you back to the same boot time. >> >>>> >> >>>> Loading modules via loader.conf is many times slower than doing it >> >>>> from >> >>>> 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 boo= t. >> >>>> (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 t= he >> >>>> 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 man= y >> >>> hosts -like here where most of the hosts are dataless-, so, moving t= he >> > not >> >>> essential ones to rc.conf was the obvious solution. >> >> >> >> >> >> what would be REALLY cool would be the ability to make loader.conf ha= ve >> > 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? >> >> =A0 =A0The values are eval'ed from Forth-code, not /bin/sh -- so it's no= t >> a shell script in the way that you're generally used to :). >> =A0 =A0But yes, it could be made conditional. > > I was talking about rc.conf.... is that Forth too? No, that's definitely bourne shell, but it breaks some tools like Devin Taske's sysrc, etc if you use that :). I thought you were talking about what gets read in with device.hints / loader.conf / loader.rc. Thanks! -Garrett