Sha256: 5e21ea409501248f4134e998403c284307930a0832f4ae9955f8c569a319feb2
Contents?: true
Size: 511 Bytes
Versions: 48
Compression:
Stored size: 511 Bytes
Contents
module VagrantPlugins module GuestNetBSD module Cap class ChangeHostName def self.change_host_name(machine, name) if !machine.communicate.test("hostname -s | grep '^#{name}$'") machine.communicate.sudo(<<CMDS, {shell: "sh"}) sed -e 's/^hostname=.*$/hostname=#{name}/' /etc/rc.conf > /tmp/rc.conf.vagrant_changehostname_#{name} && mv /tmp/rc.conf.vagrant_changehostname_#{name} /etc/rc.conf && hostname #{name} CMDS end end end end end end
Version data entries
48 entries across 44 versions & 5 rubygems