lib/linux_admin/network_interface/network_interface_rh.rb
# Applies the given static network configuration to the interface
#
# @param ip [String] IPv4 address
# @param mask [String] subnet mask
# @param gw [String] gateway address
# @param dns [Array<String>] list of dns servers
# @param search [Array<String>] list of search domains
# @return [Boolean] true on success, false otherwise
# @raise ArgumentError if an IP is not formatted properly
Applies the given static network configuration to the interface
Applies the given static network configuration to the interface
def apply_static(ip, mask, gw, dns, search = nil)
      self.address      = ip
      self.netmask      = mask
      self.gateway      = gw
      self.dns          = dns
      self.search_order = search if search
      save
    end
def apply_static ( ip , mask , gw , dns , search = nil ) self . address = ip self . netmask = mask self . gateway = gw self . dns = dns self . search_order = search if search save end
Applies the given static network configuration to the interface
Applies the given static network configuration to the interface
true on success, false otherwise
true on success false otherwise
Boolean
ArgumentError if an IP is not formatted properly
ArgumentError if an IP is not formatted properly
ip
None
mask
None
gw
None
dns
list of dns servers
list of dns servers
search
list of search domains
list of search domains