FQDN's instead of short hostnames

Frans Coppens frans at coppens-2.demon.nl
Thu Jul 28 12:44:11 CEST 2005


Hi,

I noticed that '/usr/sbin/fai-setup' returns the short hostname from
'/etc/hosts' in order to add the hostname to
'/usr/lib/fai/nfsroot/root/.ssh/known_hosts'. This causes problems when
using FQDN's in '/etc/fai/fai.conf' as the install-client tries to open
a ssh connection to the installserver using its FQDN. This causes ssh to
display a confirmation message to add the host to it's known_hosts file
- which is of course impossible because the nfs-root is mounted
read-only - or cancel the connection. This confirmation message is
displayed everytime you want to install a client.

I've solved the problem temporarily by modifying '/usr/sbin/fai-setup'
and replaced 
HOSTNAME=`grep $SERVERIP /etc/hosts | perl -p -e 's/[\d.\s]*([\w-]*).*//
&& print $1'`
with
HOSTNAME=`hostname -f`

This works for me, however, this may not be the most pretty solution. It
maybe nicer to change the perl part of the line tot extract the FQDN.
Unfortunatly, my knowledge of perl is rather non-existing, so...

Regards,

Frans Coppens
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20050728/e10d36a6/attachment.bin 


More information about the linux-fai mailing list