    # File lib/chef/provider/ifconfig.rb, line 41
          def load_current_resource
            @current_resource = Chef::Resource::Ifconfig.new(@new_resource.name)

            @interfaces = {}

            status = popen4("ifconfig") do |pid, stdin, stdout, stderr|
              stdout.each do |line|

                if !line[0..9].strip.empty?
                  @int_name = line[0..9].strip
                  @interfaces[@int_name] = {"hwaddr" => (line =~ /(HWaddr)/ ? ($') : "nil").strip.chomp }
                else
                  @interfaces[@int_name]["inet_addr"] = (line =~ /inet addr:(\S+)/ ? ($1) : "nil") if line =~ /inet addr:/
                  @interfaces[@int_name]["bcast"] = (line =~ /Bcast:(\S+)/ ? ($1) : "nil") if line =~ /Bcast:/
                  @interfaces[@int_name]["mask"] = (line =~ /Mask:(\S+)/ ? ($1) : "nil") if line =~ /Mask:/
                  @interfaces[@int_name]["mtu"] = (line =~ /MTU:(\S+)/ ? ($1) : "nil") if line =~ /MTU:/
                  @interfaces[@int_name]["metric"] = (line =~ /Metric:(\S+)/ ? ($1) : "nil") if line =~ /Metric:/
                end

                if @interfaces.has_key?(@new_resource.device)
                  @interface = @interfaces.fetch(@new_resource.device)

                  @current_resource.target(@new_resource.target)
                  @current_resource.device(@int_name)
                  @current_resource.inet_addr(@interface["inet_addr"])
                  @current_resource.hwaddr(@interface["hwaddr"])
                  @current_resource.bcast(@interface["bcast"])
                  @current_resource.mask(@interface["mask"])
                  @current_resource.mtu(@interface["mtu"])
                  @current_resource.metric(@interface["metric"])
                end
              end
            end

            unless status.exitstatus == 0
              raise Chef::Exception::Ifconfig, "ifconfig failed - #{status.inspect}!"
            end

            @current_resource
          end