Skip to content

Commit

Permalink
Merge branch 'master' of github.com:sebastien/cuisine
Browse files Browse the repository at this point in the history
Conflicts:
	src/cuisine.py
  • Loading branch information
sebastien committed Jan 17, 2012
2 parents bcf4936 + 314b75b commit b0d09d4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/cuisine.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,15 +594,13 @@ def upstart_ensure(name):

def system_uuid_alias_add():
"""Adds system UUID alias to /etc/hosts.
Some tools/processes rely/want the hostname as an alias in
/etc/hosts e.g. `127.0.0.1 localhost <hostname>`.
"""
with mode_sudo(), cd('/etc'):
old = "127.0.0.1 localhost"
new = old + " " + system_uuid()
file_update('hosts', lambda x: text_replace_line(x, old, new)[0])
old = "127.0.0.1 localhost"
new = old + " " + system_uuid()
file_update('hosts', lambda x: text_replace_line(x, old, new)[0])

def system_uuid():
"""Gets a machines UUID (Universally Unique Identifier)."""
Expand Down

0 comments on commit b0d09d4

Please sign in to comment.