You can put anything you want in /etc/resolv.conf, as it will
be over-written the moment that DHCP gets the info from
the ISP. :-)
Normally, if using DHCP client, you don't put anything in
/etc/resolv.conf. It will happen auto-magically when dhcp-client
gets going. The script /sbin/dhclient-script does the work.
If you really must stick something in /etc/resolv.conf and are
a dhcp client, then you will probably want to edit
/sbin/dhclient-script.
In the script you will find the function make_resolv.conf()
Here is an example where I have added stuff to stick in
/etc/resolv.conf.
function make_resolv_conf() {
if [ -n "$new_domain_name" ] || [ -n "$new_domain_name_servers" ]; then
echo '; generated by /sbin/dhclient-script' > /etc/resolv.conf
if [ -n "$new_domain_name" ]; then
echo search $new_domain_name >> /etc/resolv.conf
fi
echo search home.org >> /etc/resolv.conf
echo nameserver 192.168.164.253 >>/etc/resolv.conf
echo nameserver 47.124.35.253 >>/etc/resolv.conf
for nameserver in $new_domain_name_servers; do
echo nameserver $nameserver >>/etc/resolv.conf
done
fi
}
Note: The above is ugly, and should not be needed if the DHCP
server is working correctly.
Note: The above discussion is for a RH box.
Enjoy,
Mangled&Munged.
"Stephen Speicher" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) caldomain...
> I am using Red Hat Enterprise Linux 3. Can someone tell me
> exactly what belongs in /etc/resolv.conf if you are using dhcp to
> set the IP address and the DNS?
>
> --
> Stephen
> (E-Mail Removed)
>
> Ignorance is just a placeholder for knowledge.
>
> Printed using 100% recycled electrons.
> -----------------------------------------------------------