Hi,

I will set hostnames in the pxe boot files. 

On Monday 24 January 2005 12:59, Holger Schurig wrote:
> I tried that first, but it did not work. The code line
> in /usr/lib/fai/sbin/rcS_fai reads:
>
> -----------------
>  if [ $HOSTNAME = '(none)' -a -n "$HOST" ]; then
> -----------------
>
> and therefore HOST= on the kernel command line only works if HOSTNAME
> had the previous value '(none)'. But in my setup this is not true,
> the DHCP client set it to something numeric:

Example:
/tftpboot/pxelinux.cfg/01-00-00-0c-f1-bc-d2

-----
label fai-generated
kernel vmlinuz-install
append HOST=EinTest ip=dhcp devfs=nomount FAI_ACTION=install 
root=/dev/nfs FAI_FLAGS=verbose,createvt,syslogd,reboot
-----

>  if [ $HOSTNAME = '(none)' -a -n "$HOST" ]; then
I patch this line in rcS in nfsroot.
to:  if [ -n "$HOST" ]; then

Is there something wrong with this new line? 

Is there any big additional risk for my network with this patch? Or is 
there a other standard way to set the hostname in the pxe tftpboot 
file. 

OK I can use a very simple hook like Holger. 

But it is not relay nice. I think the HOST parameter is a nice extension 
for fai. Because you change the pxe file without restarting the dhcpd. 
And you can have different config files so you can give special
user access to the config files.

bye Andreas 
PS: I use the atftpd. 

Reply via email to