Sha256: 40a0bf590b9862b8080d5863f8fbc141782f183b2d7ce1dc195f4e3f3af46226
Contents?: true
Size: 497 Bytes
Versions: 7
Compression:
Stored size: 497 Bytes
Contents
module VagrantPlugins module GuestFreeBSD module Cap class ChangeHostName def self.change_host_name(machine, name) if !machine.communicate.test("hostname -f | grep '^#{name}$' || hostname -s | grep '^#{name}$'", {shell: "sh"}) machine.communicate.sudo("sed -i '' 's/^hostname=.*$/hostname=#{name}/' /etc/rc.conf", {shell: "sh"}) machine.communicate.sudo("hostname #{name}", {shell: "sh"}) end end end end end end
Version data entries
7 entries across 4 versions & 3 rubygems