> where is the hostname set during the FAI boot? I ~think~ it's just the DHCP server that set's the name. The dhcp-client can be told to ignore this setting. Then you would end up with whatever is currently configured (Debian/Ubuntu: /etc/hostname, SuSE: /etc/HOSTNAME, RedHat: cat /etc/sysconfig/network)
> where is the HOSTNAME variable set during the FAI boot? It's a bash-ism. bash retrieve's the current hostname from the kernel and defines the HOSTNAME variable. If the session ends (the script terminates) then whatever you put there is forgotten so I advise against trying to fix your problem here. For (re-)setting the hostname you could either do a manual 'hostname <hostname>' or perform a 'echo <hostname> > /proc/sys/kernel/hostname'. (For updating the current shell's HOSTNAME variable you either need to spawn a new shell process or manually update the HOSTNAME variable.)