On Sat, Oct 13, 2001 at 01:25:29PM -0300, Daniel C. Sobral wrote:
> Vadim Vygonets wrote:
> >
> > We are working on integration of network-booted FreeBSD system to
> > our envoronment. Naturally, different machines need different
> > kernels, so we pass the kernel paramater in DHCP response.
> > However, it gets overwritten in /boot/defaults/loader.conf. We
> > decided that commenting out the assignment of 'kernel' and
> > 'kernel_options' is not what we want, because we want both to use
> > the default value and to be able to override it via DHCP.
> >
> > After taking some time to learn Forth (interesting language, I
> > must say) and a false start (involving saving environment
> > variables (names and values) in a linked list and restoring them
> > after the assignment), I decided to use the Makefile syntax of ?=
> > to set an environment variable if it's not set yet, so it will be
> > possible to say:
> >
> > kernel?="/kernel"
> >
> > In this case, if kernel is set via DHCP, the value is not
> > changed, but if it's not, it becomes "/kernel". Attached is the
> > patch for /boot/support.4th against the version in FreeBSD 4.4.
>
> Loader.conf's syntax was designed to be such that the files could be
> processed by sh(1). I rather prefer to keep faithful to that by using
> the shell expansions tricks sh(1) has. OTOH, that wouldn't be a trivial
> task to undertake, and I don't have time to do it. Add to that, being
> able to sh-process loader.conf files is of dubious usefulness. So I do
> not object to such a change, as long as more people weight in first on
> this matter.
Is there any chance off implementing syntax like
kernel=${kernel:-/kernel}
which is obviously sh-compilant?
>
> --
> Daniel C. Sobral (8-DCS)
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
>
> wow regex humor... I'm a geek
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-hackers" in the body of the message
--
Igor M Podlesny
Morning Network hostmaster http://good.morning.ru
phone: +7 3912 296962 mailto:[EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message