[Pkg-puppet-devel] [facter] 188/352: Merge pull request #509 from mzeren-vmw/fix/22060/undefined_path_in_macaddress

Stig Sandbeck Mathisen ssm at debian.org
Sun Apr 6 22:21:44 UTC 2014


This is an automated email from the git hooks/post-receive script.

ssm pushed a commit to branch master
in repository facter.

commit 7a78e74df96691dffb2e9b6ad6fcdb787ffd40e4
Author: Adrien Thebo <git at somethingsinistral.net>
Date:   Tue Aug 13 11:30:16 2013 -0700

    Merge pull request #509 from mzeren-vmw/fix/22060/undefined_path_in_macaddress
    
    (fact-202) Fix undefined path in macaddress.rb
---
 lib/facter/macaddress.rb | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/lib/facter/macaddress.rb b/lib/facter/macaddress.rb
index 3bcc927..3d0dffa 100644
--- a/lib/facter/macaddress.rb
+++ b/lib/facter/macaddress.rb
@@ -12,19 +12,6 @@ require 'facter/util/ip'
 
 Facter.add(:macaddress) do
   confine :kernel => 'Linux'
-  has_weight  10                # about an order of magnitude faster
-  setcode do
-    begin
-      Dir.glob('/sys/class/net/*').reject {|x| x[-3..-1] == '/lo' }.first
-      path and File.read(path + '/address')
-    rescue Exception
-      nil
-    end
-  end
-end
-
-Facter.add(:macaddress) do
-  confine :kernel => 'Linux'
   setcode do
     ether = []
     output = Facter::Util::IP.exec_ifconfig(["-a","2>/dev/null"])

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git



More information about the Pkg-puppet-devel mailing list