lib/linux_admin/network_interface/network_interface_rh.rb
# Set up the interface to use DHCP
# Removes any previously set static IPv4 networking information
Set up the interface to use DHCP
Removes any previously set static IPv4 networking information
Set up the interface to use DHCP Removes any previously set static IPv4 networking information
def enable_dhcp
      @interface_config["BOOTPROTO"] = "dhcp"
      @interface_config.delete("IPADDR")
      @interface_config.delete("NETMASK")
      @interface_config.delete("GATEWAY")
      @interface_config.delete("PREFIX")
      @interface_config.delete("DNS1")
      @interface_config.delete("DNS2")
      @interface_config.delete("DOMAIN")
    end
def enable_dhcp @interface_config [ "BOOTPROTO" ] = "dhcp" @interface_config . delete ( "IPADDR" ) @interface_config . delete ( "NETMASK" ) @interface_config . delete ( "GATEWAY" ) @interface_config . delete ( "PREFIX" ) @interface_config . delete ( "DNS1" ) @interface_config . delete ( "DNS2" ) @interface_config . delete ( "DOMAIN" ) end
Set up the interface to use DHCP
Removes any previously set static IPv4 networking information
Set up the interface to use DHCP Removes any previously set static IPv4 networking information