Sha256: 372c21230bda78a254940cbd466d290b7a0edcc59747f0ef94b4e86b6438306a
Contents?: true
Size: 944 Bytes
Versions: 14
Compression:
Stored size: 944 Bytes
Contents
# == AddressManager::SunOS # # A SunOS-specific driver for the AddressManager provides complete support for # querying, adding and removing addresses. class AutomateIt::AddressManager::SunOS < AutomateIt::AddressManager::BaseDriver def self.token :sunos end depends_on :programs => %w(ifconfig uname), :callbacks => lambda{`uname -s 2>&1`.match(/sunos/i)} def suitability(method, *args) # :nodoc: # Must be higher than AddressManager::BSD available? ? 3 : 0 end # See AddressManager#add def add(opts) _add_helper(opts) do |opts| interpreter.sh("ifconfig %s plumb" % _interface_and_label(opts)) interpreter.sh(_ifconfig_helper(:add, opts)) end end # See AddressManager#remove def remove(opts) _remove_helper(opts) do |opts| interpreter.sh(_ifconfig_helper(:remove, opts)) interpreter.sh("ifconfig %s unplumb" % _interface_and_label(opts)) true end end end
Version data entries
14 entries across 14 versions & 2 rubygems