lib/linux_admin/network_interface/network_interface_rh.rb
def parse_conf
      @interface_config = {}

      if @interface_file.file?
        File.foreach(@interface_file) do |line|
          next if line =~ /^\s*#/

          key, value = line.split('=').collect(&:strip)
          @interface_config[key] = value
        end
      end

      @interface_config["NM_CONTROLLED"] = "no"
    end
# Parses the interface configuration file into the @interface_config hash
Parses the interface configuration file into the @interface_config hash
Parses the interface configuration file into the @interface_config hash
def parse_conf
      @interface_config = {}
      if @interface_file.file?
        File.foreach(@interface_file) do |line|
          next if line =~ /^\s*#/
          key, value = line.split('=').collect(&:strip)
          @interface_config[key] = value
        end
      end
      @interface_config["NM_CONTROLLED"] = "no"
    end
def parse_conf @interface_config = { } if @interface_file . file? File . foreach ( @interface_file ) do | line | next if line =~ / ^ \s *# / key , value = line . split ( '=' ) . collect ( & :strip ) @interface_config [ key ] = value end end @interface_config [ "NM_CONTROLLED" ] = "no" end
Parses the interface configuration file into the @interface_config hash
Parses the interface configuration file into the @interface_config hash