Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Machine 1: Centos 5.6 AMI Machine 2: Amazon Linux AMI Beta

I changed resolv.conf on both to get around an apparent DNS hiccup/lag last week, by appending 'nameserver 8.8.8.8' to the file.

The CentOS box picked it up and ran with it. Amzn Linux wouldn't take it unless I also commented out the original proper nameserver.

What would be the proper way to get the Amzn instance to acknowledge the new nameserver and ignore the first entry?

share|improve this question

I don't think this addresses your problem fully, but it might be one component of it.

Amazon’s Linux automatically creates, and overwrites, resolv.conf (at restart). Since this file is automatically recreated at startup, you probably will need to modify the creation script (/sbin/dhclient-script) for the setting to persist between reboots.

Insert echo nameserver 8.8.8.8 >> $rscf around line 68, similar to the following: /sbin/dhclient-script:

.
.
.
65:    if [ -n "$RES_OPTIONS" ]; then
66:      echo options $RES_OPTIONS >> $rscf
67:    fi
68:    echo nameserver 8.8.8.8 >> $rscf
69:    for nameserver in $new_domain_name_servers; do
70:      echo nameserver $nameserver >> $rscf
71:    done
.
.
.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.