> In fai 2.6.6 you can set the hostname by appending following parameter > to the kernel: > > HOST=demohost > > This will also set the hostname. For example. the fai CD contains > following boot entry for grub:
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: # cd /tmp/fai # grep 172.16.1.145 * ------------------ boot.log:IPADDR='172.16.1.145' dhclient.log:bount to 172.16.1.145 -- renewal in 3600 seconds. dmesg.log: <omitted> variables.sh: HOSTNAME='172.16.1.145' variables.sh: IPADDR='172.16.1.145' variables.sh: sndhostname='172.16.1.145' ------------------ I'm using ISC DHCP Client V3.0.1.
