Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CentOS6/RH6 kickstart %post script to configure network?

Status
Not open for further replies.

forrie

MIS
Mar 6, 2009
91
US
I'm new-ish to kickstart. I've been spending some time trolling through docs on the Internet and I can't seem to find a reliable example of how to configure the network interfaces (plural) in a %post script.

Seems that RH deprecates things in anaconda (bootproto, asknetwork), and those options don't account for hostname, etc.

Our systems have two interfaces, eth0 and eth1. I'd like to have the install change (chvt) and ask for the relevant IP configuration, hostname, DNS servers, etc., then proceed. Also, might be good to write a script that will automate even that at some point.

I also do not want NetworkManager touching the interfaces - who's bright idea was that.

So I can see where the initial kickstart config could assign bogus network addresses, like 1.1.1.1 and 2.2.2.2 respectively, then sed/edit those in a %post script.

Can someone help me with a working example, or examples?

Thanks!
 
Forrie,

The whole point of a kickstart install is to be hands off.

Get the correct info for your systems and use a separate ks file for each system. You can use command-line options on a generic media to specify the ks file to use, which can be provided via HTTP, NFS, FTP, or CIFS. Or, create a custom installation media for each system with ks file on the media. I hope your using a network repository :)

 
You can define DHCP or static addresses in the ks file - it does not have to be a %post script.
If you don't like Network Manager, don't install dns-masq either.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top