Kickstart set hostname issues FC5[Scanned]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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 -

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux