Sha256: 96e1b0263b9dd5437092b7c388de282925c271037837f6eac60a4635790f6300
Contents?: true
Size: 1022 Bytes
Versions: 37
Compression:
Stored size: 1022 Bytes
Contents
# A general Vagrant system implementation for "solaris 11". # # Contributed by Jan Thomas Moldung <janth@moldung.no> module VagrantPlugins module GuestSolaris11 module Cap class ChangeHostName def self.change_host_name(machine, name) su_cmd = machine.config.solaris11.suexec_cmd # Only do this if the hostname is not already set if !machine.communicate.test("/usr/sbin/svccfg -s system/identity:node listprop config/nodename | /usr/bin/grep '#{name}'") machine.communicate.execute("#{su_cmd} /usr/sbin/svccfg -s system/identity:node setprop config/nodename=\"#{name}\"") machine.communicate.execute("#{su_cmd} /usr/sbin/svccfg -s system/identity:node setprop config/loopback=\"#{name}\"") machine.communicate.execute("#{su_cmd} /usr/sbin/svccfg -s system/identity:node refresh ") machine.communicate.execute("#{su_cmd} /usr/sbin/svcadm restart system/identity:node ") end end end end end end
Version data entries
37 entries across 33 versions & 5 rubygems