> :>     'kern.conf_dir' which the kernel initially sets to nothing.
> :
> :ok, i can only suggest that if you replace the sysctl kern.conf_dir
> :variable with a shell variable as i did, you can achieve a more
...
>     That's what I had originally, but extracting the machine's IP
>     address is not trivial, and I didn't want to stick: 
> 
>     bootp_ifc=`route -n get default | fgrep interface | awk '{ print $2; }'`
>     bootp_ipa=`ifconfig $bootp_ifc | fgrep inet | head -1 | awk '{ print $2; 
> }'`

I think it is much easier than that. The kernel BOOTP support sets
the machine's hostname, so you can do something like

    if [ "`hostname`" = "" ]
    then
        # regular non-bootp sequence
        mount -u -o rw /
        ...
        mount -a -t nonfs
    else
        . /etc/rc.diskless
    fi

if you want, save the `hostname` before executing rc.network to
remember if you started as diskless or not.

> :I haven't seen how you suggest to build&populate the MFS filesystems --
...
>     There isn't much to build.  Most of the MFS filesystems start out
>     empty.

ok here we use a different approach. For simplicity I am using a
single MFS system with all the things you put in /var, and including
/var/dev and /var/etc (with /dev -> /var/dev and /etc -> /var/etc
on the diskless machine).

        cheers
        luigi
-----------------------------------+-------------------------------------
  Luigi RIZZO                      .
  EMAIL: lu...@iet.unipi.it        . Dip. di Ing. dell'Informazione
  HTTP://www.iet.unipi.it/~luigi/  . Universita` di Pisa
  TEL/FAX: +39-050-568.533/522     . via Diotisalvi 2, 56126 PISA (Italy)
-----------------------------------+-------------------------------------

To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to