Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Oct 2001 13:04:35 -0700
From:      Mike Smith <msmith@freebsd.org>
To:        Igor M Podlesny <hostmaster@morning.ru>
Cc:        "Daniel C. Sobral" <dcs@newsguy.com>, Vadim Vygonets <vadik-hackers@freebsd.vygo.net>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: loader.conf conditional assignment 
Message-ID:  <200110142004.f9EK4Ze01075@mass.dis.org>
In-Reply-To: Your message of "Sun, 14 Oct 2001 18:06:32 %2B0800." <20011014180632.A76030@ns.morning.ru> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 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.

If there's a reason why this won't work (for example, I don't think that 
the code that parses loader.conf uses the script line parser, so it's not 
going to do variable expansion) then that probably needs to be addressed, 
since there are a lot of places where this sort of thing would be useful.

Just my thoughts, anyway.

-- 
... 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110142004.f9EK4Ze01075>