From 08102df3baf78bb0f4b4d99410c5a93bb282f673 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sun, 7 Mar 2010 21:59:00 +0000 Subject: [PATCH] match subnets that might exist Signed-off-by: Stephen Gran --- facts/ipaddresses.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/facts/ipaddresses.rb b/facts/ipaddresses.rb index 17dbd84ae..d03bbbc4e 100644 --- a/facts/ipaddresses.rb +++ b/facts/ipaddresses.rb @@ -4,7 +4,7 @@ Facter.add("v4ips") do %x{ip addr list}.each do |line| next unless line =~ /\s+inet/ next if line =~ /scope (link|host)/ - if line =~ /\s+inet\s+(\S+)\/\d\d .*/ + if line =~ /\s+inet\s+(\S+)\/\d{1,2} .*/ addrs << $1 end end @@ -19,7 +19,7 @@ Facter.add("v6ips") do %x{ip addr list}.each do |line| next unless line =~ /\s+inet/ next if line =~ /scope (link|host)/ - if line =~ /\s+inet6\s+(\S+)\/\d\d .*/ + if line =~ /\s+inet6\s+(\S+)\/\d{1,3} .*/ addrs << $1 end end -- 2.20.1