diff options
author | Kurt Keller <kkathag@gmail.com> | 2009-09-05 15:45:43 +0100 |
---|---|---|
committer | Paul Nasrat <pnasrat@googlemail.com> | 2009-09-09 17:17:33 +0100 |
commit | 7623e254fa35a8c15a49b63ea06d28ca2a1a40d4 (patch) | |
tree | 65c222d67b93174ddf1374743d2dd73438a95699 | |
parent | bfe8a2a9e7a03c2a09273ef74d59e2843f5359ae (diff) | |
download | facter-7623e254fa35a8c15a49b63ea06d28ca2a1a40d4.tar.gz facter-7623e254fa35a8c15a49b63ea06d28ca2a1a40d4.tar.xz facter-7623e254fa35a8c15a49b63ea06d28ca2a1a40d4.zip |
Fix errors when alias IP's are defined
-rw-r--r-- | lib/facter/util/ip.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/facter/util/ip.rb b/lib/facter/util/ip.rb index 9fb7034..5941d38 100644 --- a/lib/facter/util/ip.rb +++ b/lib/facter/util/ip.rb @@ -84,6 +84,13 @@ module Facter::Util::IP if not FileTest.executable?("/sbin/ip") return nil end + # A bonding interface can never be an alias interface. Alias + # interfaces do have a colon in their name and the ip link show + # command throws an error message when we pass it an alias + # interface. + if interface =~ /:/ + return nil + end regex = /SLAVE[,>].* (bond[0-9]+)/ ethbond = regex.match(%x{/sbin/ip link show #{interface}}) if ethbond |