Please review pull request #143: Previously the add master to /etc/hosts step would move all lines opened by (justinstoller)
Description:
except for those that contained the hostname of the master. If
someone had an /etc/hosts file like this:
127.0.0.1 localhost localhost.localdomain ubuntu-alpha
...snip...
It would filter out the localhost line and cause odd errors later
on. This changes the early step to filter out only the lines that
we add (#{ip} #{hostname})
Signed-off-by: Justin Stoller jus...@puppetlabs.com
- Opened: Sat Feb 11 00:12:13 UTC 2012
- Based on: puppetlabs:master (0d86568b39055e5e24166fab72f00665566e89c4)
- Requested merge: justinstoller:really_nice_etc_hosts (a252d76147204e6a3db163d57867368ad977c981)
Diff follows:
diff --git a/setup/early/05-add_master_etc_hosts.rb b/setup/early/05-add_master_etc_hosts.rb index f63e8e5..7d76990 100644 --- a/setup/early/05-add_master_etc_hosts.rb +++ b/setup/early/05-add_master_etc_hosts.rb @@ -8,6 +8,6 @@ # Preserve the mode the easy way... on master, "cp /etc/hosts /etc/hosts.old" on master, "cp /etc/hosts /etc/hosts.new" -on master, "grep -v '#{master}' /etc/hosts > /etc/hosts.new" +on master, "grep -v '#{ip} #{master}' /etc/hosts > /etc/hosts.new" on master, "echo \"#{ip} #{master}\" >> /etc/hosts.new" on master, "mv /etc/hosts.new /etc/hosts"
--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.