[Pkg-puppet-devel] [SCM] Packaging of Facter for debian branch, upstream, updated. 51bcebe38cab6088c901f1006339bbe40a36d161

Paul Nasrat pnasrat at googlemail.com
Wed Aug 18 05:55:40 UTC 2010


The following commit has been merged in the upstream branch:
commit feecd393a6d6d94dcea913a3fdf7bb48d9f2e493
Author: Ricky Zhou <ricky at fedoraproject.org>
Date:   Mon Dec 21 15:34:54 2009 -0500

    Only ignore IPs starting with 127.

diff --git a/lib/facter/ipaddress.rb b/lib/facter/ipaddress.rb
index 95cdc64..dd0d418 100644
--- a/lib/facter/ipaddress.rb
+++ b/lib/facter/ipaddress.rb
@@ -7,7 +7,7 @@ Facter.add(:ipaddress) do
         output.split(/^\S/).each { |str|
             if str =~ /inet addr:([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/
                 tmp = $1
-                unless tmp =~ /127\./
+                unless tmp =~ /^127\./
                     ip = tmp
                     break
                 end
@@ -27,7 +27,7 @@ Facter.add(:ipaddress) do
         output.split(/^\S/).each { |str|
             if str =~ /inet ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/
                 tmp = $1
-                unless tmp =~ /127\./
+                unless tmp =~ /^127\./
                     ip = tmp
                     break
                 end
@@ -47,7 +47,7 @@ Facter.add(:ipaddress) do
         output.split(/^\S/).each { |str|
             if str =~ /inet ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/
                 tmp = $1
-                unless tmp =~ /127\./
+                unless tmp =~ /^127\./
                     ip = tmp
                     break
                 end
@@ -78,7 +78,7 @@ Facter.add(:ipaddress) do
         output.split(/^\S/).each { |str|
             if str =~ /inet ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/
                 tmp = $1
-                unless tmp =~ /127\./
+                unless tmp =~ /^127\./
                     ip = tmp
                     break
                 end
@@ -98,7 +98,7 @@ Facter.add(:ipaddress) do
         output.split(/^\S/).each { |str|
             if str =~ /inet ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/
                 tmp = $1
-                unless tmp =~ /127\./
+                unless tmp =~ /^127\./
                     ip = tmp
                     break
                 end
@@ -118,7 +118,7 @@ Facter.add(:ipaddress) do
         output.split(/^\S/).each { |str|
             if str =~ /IP Address.*: ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/
                 tmp = $1
-                unless tmp =~ /127\./
+                unless tmp =~ /^127\./
                     ip = tmp
                     break
                 end

-- 
Packaging of Facter for debian



More information about the Pkg-puppet-devel mailing list