From owner-freebsd-arch Sun Sep 17 13:35:23 2000 Delivered-To: freebsd-arch@freebsd.org Received: from green.dyndns.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 757F637B423; Sun, 17 Sep 2000 13:35:14 -0700 (PDT) Received: from localhost (11h991@localhost [127.0.0.1] (may be forged)) by green.dyndns.org (8.11.0/8.11.0) with ESMTP id e8HKYk525175; Sun, 17 Sep 2000 16:34:46 -0400 (EDT) (envelope-from green@FreeBSD.org) Message-Id: <200009172034.e8HKYk525175@green.dyndns.org> X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 To: Alfred Perlstein Cc: Warner Losh , arch@FreeBSD.org, sjr@home.net Subject: Re: sysctl on boot. In-Reply-To: Message from Alfred Perlstein of "Sun, 17 Sep 2000 12:34:32 PDT." <20000917123432.M15156@fw.wintelcom.net> From: "Brian F. Feldman" Date: Sun, 17 Sep 2000 16:34:46 -0400 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > * Warner Losh [000917 12:04] wrote: > > > > Stephen Roznowski reports in PR conf/19629 that there's a weakness in > > /etc/rc.sysctl. As it stands now, it runs early in the boot process. > > And it needs to run early in the boot process for many sysctls. > > However, there is a problem. If you modload a driver or module after > > this point, any variables set early in the boot process will not be > > effective (because the setting fails). > > > > A short term fix is to just rerun /etc/rc.sysctl at the end of the > > boot sequence, just before the secrelevel change. Stephen's PR > > suggests this with a patch. I think it is good, but wanted to get > > some feedback from others before doing this. > > > > A long term fix might be to give the kernel a memory so it can > > initialize the sysctls from the get go. However, that's much harder > > to pull off and a whole lot more work. > > > > Comments? > > This is potentially dangerous as i'm not sure all sysctls are > idempotent (sp?) meaning setting them twice can have weird > effects, a solution might be to add another rc.sysctl2 or > rc.sysctl.modules or something. Yes, I agree with this. I'd call them rc.sysctl (keep that the same) and rc.late_sysctl (which would run after most things as you propose, before the securelevel change). You couldn't easily give the kernel a memory because the user might want sysctls in a specific order and you'd have to be able to record either the oid or the oid name for a given sysctl... and that wouldn't solve the problem of when to set them. IOW, it would add complexity but not gain anything that postponing rc.sysctl or adding a secondary rc wouldn't gain. So I wouldn't bother with that :) You're making it seem like we need a registry. I'd be a million times happier if a kldload(2) specified a hints file that could be used easily. -- Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! / green@FreeBSD.org `------------------------------' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message