Kickstart set hostname issues FC5[Scanned]

Chris Bradford chrisbradford at
Mon Jul 3 14:43:53 UTC 2006

Hi guys,

I'm trying to setup a way to manually enter a hostname as part of the 
post install script in my Kickstart file. The process works, but the 
hostname does not register on our DNS servers *unless* I enter it on the 
Linux client under System > Administration > Network > Devices > Edit > 
DHCP Settings > Hostname.

The script I am using is:

#switch to a virtual terminal
exec < /dev/tty3 > /dev/tty3
chvt 3

#Get Hostname
echo -n "Enter Hostname: "
echo ""
read hostname

#Set Hostname
cat << EOF >> /etc/sysconfig/network~

cat << EOF >> /etc/hosts~    $hostname    localhost.localdomain    localhost

mv /etc/hosts~ /etc/hosts
mv /etc/sysconfig/network~ /etc/sysconfig/network

#echo HOSTNAME=$hostname >> /etc/sysconfig/network
hostname $HOSTNAME
echo "Set Hostname....."

#Switch Back to tty1
exec < /dev/tty1 > /dev/tty1
chvt 1

The only thing I can assume is that the hostname is also stored in 
another file? Everything works fine after I add the hostname into the 
DHCP settings, until I do that the machine is unresolvable.

Any ideas?



This message has been scanned for viruses by BlackSpider MailControl -

More information about the users mailing list