#2333, more fixes - right order to get fqdn right

This commit is contained in:
Elliot Segler 2013-10-08 17:53:27 +08:00
parent 1abcf1e54f
commit 06aaa6e6ea
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ module VagrantPlugins
# hosts should resemble: # hosts should resemble:
# 127.0.0.1 localhost host.fqdn.com host # 127.0.0.1 localhost host.fqdn.com host
# 127.0.1.1 host.fqdn.com host # 127.0.1.1 host.fqdn.com host
comm.sudo("sed -ri 's@^((\\b[0-9]{1,3}\.){3}[0-9]{1,3})\\b.*(localhost).*$@\\1\\t\\3 #{name} #{name.split('.')[0]}@g' /etc/hosts") comm.sudo("sed -ri 's@^((\\b[0-9]{1,3}\.){3}[0-9]{1,3})\\b.*(localhost).*$@\\1\\t#{name} #{name.split('.')[0]} \\3@g' /etc/hosts")
comm.sudo("sed -ri 's@^((\\b[0-9]{1,3}\.){3}[0-9]{1,3})\\b.*(precise64).*$@\\1\\t#{name} #{name.split('.')[0]}@g' /etc/hosts") comm.sudo("sed -ri 's@^((\\b[0-9]{1,3}\.){3}[0-9]{1,3})\\b.*(precise64).*$@\\1\\t#{name} #{name.split('.')[0]}@g' /etc/hosts")
if comm.test("[ `lsb_release -c -s` = hardy ]") if comm.test("[ `lsb_release -c -s` = hardy ]")