Sha256: c1d1cdee9423084ba202be2d1047ee3dd5707fdc93b76a0e315e968e7f1e2d55
Contents?: true
Size: 571 Bytes
Versions: 3
Compression:
Stored size: 571 Bytes
Contents
module VagrantPlugins module GuestDarwin module Cap class ChangeHostName def self.change_host_name(machine, name) if !machine.communicate.test("hostname -f | grep '^#{name}$' || hostname -s | grep '^#{name}$'") machine.communicate.sudo("scutil --set ComputerName #{name}") machine.communicate.sudo("scutil --set HostName #{name}") machine.communicate.sudo("scutil --set LocalHostName #{name}") machine.communicate.sudo("hostname #{name}") end end end end end end
Version data entries
3 entries across 1 versions & 1 rubygems