I'm trying to configure my anaconda file so that a new server will have the following entries in its /etc/resolv.conf :
search com domain1.com domain2.com
nameserver 1.2.3.4
nameserver 2.3.4.5
I know how to add the nameserver entries :
network --nameserver 1.2.3.4,2.3.4.5
but how do I edit the search line ?
Thanks ahead.
Note: If you are the author of this question and wish to assign points to any of the answers, please login first.For more information on assigning points ,click
here
Eli, To be pricise, you're speaking about kickstart configuration. As usually in unix, you can do this in a few ways, one of them is just add appropriate lines in "%post" section, like this:
%post echo "search com domain1.com domain2.com " >> /etc/resolv.conf
the %post is a known option and it is what I've used till now. I'm trying to use as much options as possible in the anaconda file itself and not write "echo" connamnds in the post section.
A quick look into the RHEL Installation Guide would have told you that there is *no* documented option in the kicstart configuration file for setting the DNS search list:
I can see their reasoning: the installation procedure itself does not need DNS search lists for anything (after all, it's easy enough to specify fully-qualified names in the kickstart configuration file if you need to specify something by hostname), and there is no harm in using Vitaly's technique for configuring it. So why implement extra features if you can Keep It Simple?