From owner-freebsd-hackers Sun Oct 14 16:27:43 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.dis.org (mass.dis.org [216.240.45.41]) by hub.freebsd.org (Postfix) with ESMTP id B838437B40B; Sun, 14 Oct 2001 16:27:38 -0700 (PDT) Received: from mass.dis.org (localhost [127.0.0.1]) by mass.dis.org (8.11.6/8.11.3) with ESMTP id f9ENcgx01642; Sun, 14 Oct 2001 16:38:43 -0700 (PDT) (envelope-from msmith@mass.dis.org) Message-Id: <200110142338.f9ENcgx01642@mass.dis.org> X-Mailer: exmh version 2.1.1 10/15/1999 To: clefevre@citeweb.net Cc: Mike Smith , Igor M Podlesny , "Daniel C. Sobral" , Vadim Vygonets , freebsd-hackers@freebsd.org Subject: Re: loader.conf conditional assignment In-reply-to: Your message of "Mon, 15 Oct 2001 00:44:19 +0200." <200110142244.f9EMiKA73045@gits.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 14 Oct 2001 16:38:42 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Mike Smith wrote: > > > Is there any chance off implementing syntax like > > > > > > kernel=${kernel:-/kernel} > > > > > > which is obviously sh-compilant? > > > > I don't much like either of these proposals. > > > > My principal objection is that they're trying to solve the wrong problem. > > > > The original poster is setting $kernel in the DHCP client code, and then > > having it overwritten when defaults/loader.conf is parsed. > > > > If instead they set $dhcp_kernel, and then put > > > > kernel=$dhcp_kernel > > > > in their "real" loader.conf the entire problem should go away, and we > > don't have to extend any of the syntax. > > what's happen if $dhcp_kernel isn't sets ? $kernel is set to nothing. However, in this user's application, this isn't going to happen unless they're misconfigured. They won't have fetched the loader.conf that contains the above assignment unless they've contacted the right DHCP server in the first place. Note that this could *also* be worked around by setting $dhcp_kernel and then testing for it in an additional Forth procedure that runs after boot-conf. There are lots of ways of customising this. I'm not certain yet how we should handle the integration of DHCP parameters into the loader environment space; any solution needs to work well across the entire spectrum. -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message