Operating System - Linux
1830133 Members
2783 Online
109999 Solutions
New Discussion

Re: Configurin anaconda file

 
Eli_pok
Frequent Advisor

Configurin anaconda file

Hi,

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.
3 REPLIES 3
Vitaly Karasik_1
Honored Contributor

Re: Configurin anaconda file

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

See some kickstart reference for more.
Eli_pok
Frequent Advisor

Re: Configurin anaconda file

Thank for your reply.

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.

Matti_Kurkela
Honored Contributor

Re: Configurin anaconda file

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:

https://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.4/html/Installation_Guide/s1-kickstart2-options.html#d0e23896

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?

MK
MK