fai trick: fix weird hostname
Holger Schurig
hs4233 at mail.mn-solutions.de
Mon Jan 24 11:38:06 CET 2005
Sometims I have to setup similar servers for customers. They don't end up
in our local LAN, so they don't get local IP adresses. Instead, they get
some short-lived dynamic IP address via DHCP.
There is no hostname in our local DNS for those DHCP addresses, so FAI
assigns the IP address (!) to HOSTNAME. But '172.16.1.241' is a weird
hostname. This is later used in /etc/hostname, /etc/hosts and probably at
other places.
The following hook fixes this behavior:
/usr/local/fai/hooks/setup.DEFAULT.source
--------------------------------
echo $HOSTNAME | grep -q ^[0-9] && {
export HOSTNAME=linux
hostname $HOSTNAME
}
--------------------------------
More information about the linux-fai
mailing list