Remove useless line
/usr/bin/sethostname will change /etc/hostname, useless to do it twice
This commit is contained in:
parent
a9b8139755
commit
0b588e3656
|
@ -4,7 +4,6 @@ module VagrantPlugins
|
||||||
class ChangeHostName
|
class ChangeHostName
|
||||||
def self.change_host_name(machine, name)
|
def self.change_host_name(machine, name)
|
||||||
if !machine.communicate.test("hostname | grep '^#{name}$'")
|
if !machine.communicate.test("hostname | grep '^#{name}$'")
|
||||||
machine.communicate.sudo("sh -c 'echo \"#{name}\" > /etc/hostname'")
|
|
||||||
machine.communicate.sudo("/usr/bin/sethostname #{name}")
|
machine.communicate.sudo("/usr/bin/sethostname #{name}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue