On Wed, 24 Apr 2002, Danny Braniss wrote:
> i modified libstand/bootp.c to place all the tags - that dhcp provides - in
> the kernel
> environmet, so that they can be used later - eg in rc.diskless1.
> what if:
>       we place the rc.conf[.local] there?
>       in the dhcpd.conf:
>               option rc-conf ""
> and so - automagicaly -
>       `kenv rc.conf.diskless_root_readonly`
> or
>       kenv | grep rc.conf | sed 's/rc.conf.//' > rc.conf

Note that Luigi has recently committed something similar to create the
sysctl kern.bootp_cookie (see /sys/nfs_client/bootp.c rev 1.36).

I have also been doing the same thing for some time, but the difference in
my version is that I use four separate DHCP options (133,134,135,136 at
present, though this isn't important) and concatenate their together onto
the end of the (MFS copy of)  /etc/rc.conf from rc.diskless1.

The reason for using four options is that in the DHCP configuration there
are a number of different scopes in which you can put the option
assignments, all of which are potentially useful for diskless
configuration options.

For example, in our setup we have some things that need to be set
per-subnet (eg. which servers to use), some that need to be per group{} of
machines in the dhcpd.conf (eg. we have one group of 486-class machines
that are pure X-terminals, and another of more powerful machines which are
allowed to run more services locally), and finally there are some options
that need to be set per-machine (eg. which machines need to run lpd
because they have a printer attached).  Each scope gets its own DHCP
option, and then they are all concatenated together onto the end of

Before implementing this scheme, we tried to use the /etc/conf/<ipaddr>
scheme, but this didn't really scale well.  We started with just two
classes of hardware, so had two /etc/conf/{IBM,COMPAQ} directories with
symlinks for each of the machines of that class, but then as the network
expanded we needed per-subnet configuration and the /etc/conf/${ipba}
scheme didn't work as we still needed the per-machine-class configuration
too.  Then we started adding local printers and we now had
etc and then we got some new hardware that wasn't quite the same...

With the new scheme, everything is configured in just one place and
adding a new machine or a new per-subnet service is easy.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to