diff options
Diffstat (limited to 'lib/facter/util/ip.rb')
-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 |