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:

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

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

#Set Hostname
cat << EOF >> /etc/sysconfig/network~
NETWORKING=yes
HOSTNAME=$hostname
EOF

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

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?

Cheers

-Chris


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux