Wish List
Danny Braniss
danny at cs.huji.ac.il
Fri Jan 23 03:41:58 PST 2004
this is what i did for -current if using PXE boot.
The libstand/bootp.c was modified to imports the dhcp tags into the kernel
environment, I then 'invented' rc.conf[0-9], i.e, in the dchpd.conf:
option FBSD.conf-path="fs-01:/share/conf";
option FBSD.rc-conf0 "rc.conf";
option FBSD.rc-conf2 "rc.ws-5.2";
...
then i added this code to /etc/rc.d/initdiskless:
confpath=`kenv conf-path`
if [ "$confpath" ] ; then
if [ "`expr $confpath : '\(.*\):'`" ] ; then
echo Mounting $confpath on /conf
mount_nfs $confpath /conf
chkerr $? "mount_nfs $confpath /conf"
fi
fi
eval `kenv -s -c rc.`
rm -f /etc/rc.conf /etc/rc.conf.local
for fc in $conf0 $conf1 $conf2 $conf3 $conf4 $conf5 $conf6 $conf7 $conf8
$conf9 rc.conf.$hostname
do
ho=`expr $fc : '\(.*\):'`
fl=`expr $fc : '.*/\(.*\)'`
if [ "${ho}" != "" ]; then
mp=`expr $fc : '\(.*\)/.*'`
mount_nfs $mp /mnt > /dev/null 2>&1
if [ -f /mnt/$fl ]; then
echo "# from $fc /mnt/$fl" >> /etc/rc.conf
cat /mnt/$fl >> /etc/rc.conf
fi
umount /mnt > /dev/null 2>&1
elif [ -e /conf/$fc ] ; then
echo "# from /conf/$fc" >> /etc/rc.conf
cat /conf/$fc >> /etc/rc.conf
fi
done
see
http://www.freebsd.org/cgi/query-pr.cgi?pr=61239
danny
More information about the freebsd-current
mailing list