Sha256: 3c88f8b00ab3f6fd835753bf0a48004dbb28e2a07fde5d4bd1d3b957ecf31916
Contents?: true
Size: 511 Bytes
Versions: 1
Compression:
Stored size: 511 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vagrant-cloudstack-1.2.0 | vendor/bundle/bundler/gems/vagrant-c84e05fd063f/plugins/guests/freebsd/cap/change_host_name.rb |