Define FAI_CONFIG_SRC from dhcp info

Nicolas Courtel courtel at cena.fr
Wed Feb 7 19:10:30 CET 2007


Thomas Lange a écrit :

>>>>>>On Tue, 06 Feb 2007 19:52:25 +0100, Nicolas Courtel <courtel at cena.fr> said:
>>>>>>            
>>>>>>
>
>    > My FAI server (version 3.1.6 for Etch) is connected to several networks, 
>    > and has a different name on each network.
>    > I have configured the DHCP server so that it sends the appropriate name 
>    > on each interface, and would like to do the same thing for the 
>    > FAI_CONFIG_SRC variable : I'm looking for an FAI variable which would be 
>    > set using the "server-name" dhcp variable, and could be used as the NFS 
>    > server in FAI_CONFIG_SRC.
>Have a look at dhclient-perl. There you see that the DHCP vendor
>option 170 are mapped to FAI_CONFIG_SRC.
>
>  option_170              FAI_CONFIG_SRC
>
>So you should use this in dhcpd.conf
>  option option-170 "nfs://faiserver/usr/local/share/fai";  # FAI_CONFIG_SRC
>But I never tested this.
>  
>

Well, it works fine, almost out of the box. As dhclient-perl also 
defines an "fai_config_src" variable, I have declared it both in 
dhcpd.conf and dhclient-fai.conf, and FAI_CONFIG_SRC is now set to the 
appropriate value after a PXE boot.

In dhcpd.conf, in general options:
option fai_config_src code 170 = text;
and then for each subnet:
option fai_config_src 
"nfs://subnet-faiserver/usr/local/share/fai/config";  # FAI_CONFIG_SRC

In dhclient-fai.conf:
option fai_config_src code 170 = text;
and add fai_config_src to the request list

And in dhclient-perl, also added fai_config_src to @list.


>
>BTW. Maybe you like to update your FAI questionnaire from 2004 and
>sent it back to me.
>
>  
>
Surprisingly enough, my 2 year-old questionnaire is out-of-date :-) ; I 
will do so pretty soon.

Thanks for your help,

-- 
Nicolas





More information about the linux-fai mailing list