From bd5ecd7553b99e2fdd7b4875be69055ce0451f4f Mon Sep 17 00:00:00 2001 From: Steve Wills Date: Mon, 28 Oct 2013 23:50:44 +0000 Subject: - Add patch for issue where IP address detection fails if there is an interface with no addresses Submitted by: maintainer (renchap@cocoa-x.com, via IRC) Obtained from: https://github.com/opscode/ohai/pull/163/files --- sysutils/rubygem-ohai/Makefile | 1 + .../rubygem-ohai/files/patch-lib__ohai__plugins__network.rb | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 sysutils/rubygem-ohai/files/patch-lib__ohai__plugins__network.rb (limited to 'sysutils/rubygem-ohai') diff --git a/sysutils/rubygem-ohai/Makefile b/sysutils/rubygem-ohai/Makefile index 2f84947eb1d2..e747c9c9222a 100644 --- a/sysutils/rubygem-ohai/Makefile +++ b/sysutils/rubygem-ohai/Makefile @@ -3,6 +3,7 @@ PORTNAME= ohai PORTVERSION= 6.16.0 +PORTREVISION= 1 CATEGORIES= sysutils rubygems MASTER_SITES= RG diff --git a/sysutils/rubygem-ohai/files/patch-lib__ohai__plugins__network.rb b/sysutils/rubygem-ohai/files/patch-lib__ohai__plugins__network.rb new file mode 100644 index 000000000000..f285cf22ee93 --- /dev/null +++ b/sysutils/rubygem-ohai/files/patch-lib__ohai__plugins__network.rb @@ -0,0 +1,10 @@ +--- lib/ohai/plugins/network.rb.orig 2013-10-28 22:14:54.275284113 +0000 ++++ lib/ohai/plugins/network.rb 2013-10-28 22:15:30.024281591 +0000 +@@ -39,6 +39,7 @@ + # going to use that later to sort by scope + scope_prio = [ "global", "site", "link", "host", "node", nil ] + ++ next if iface_v.nil? or not iface_v.has_key? 'addresses' + ipaddresses = [] + # ipaddresses going to hold #{family} ipaddresses and their scope + Mash[network['interfaces']].each do |iface, iface_v| -- cgit v1.2.3