diff options
author | marino <marino@FreeBSD.org> | 2014-10-06 07:25:46 +0800 |
---|---|---|
committer | marino <marino@FreeBSD.org> | 2014-10-06 07:25:46 +0800 |
commit | d02678d70b666fefa650ed4285b632736f81c41e (patch) | |
tree | 926cac0f0234a80334f0d45364c72d9861b6522b /net-mgmt | |
parent | ed71cd46369464cab585051cb41da046cede522a (diff) | |
download | freebsd-ports-graphics-d02678d70b666fefa650ed4285b632736f81c41e.tar.gz freebsd-ports-graphics-d02678d70b666fefa650ed4285b632736f81c41e.tar.zst freebsd-ports-graphics-d02678d70b666fefa650ed4285b632736f81c41e.zip |
net-mgmt/collectd: Fix network IF plugin to avoid log spam
While here, remove redundant @dirrm and strip installed libraries.
PR: 191388
Reported by: Fredrik Lennmark
Fix by: maintainer (Krzysztof Stryjek)
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/collectd/Makefile | 3 | ||||
-rw-r--r-- | net-mgmt/collectd/files/patch-src__interface.c | 36 | ||||
-rw-r--r-- | net-mgmt/collectd/pkg-plist | 4 |
3 files changed, 38 insertions, 5 deletions
diff --git a/net-mgmt/collectd/Makefile b/net-mgmt/collectd/Makefile index 578040e27bd..563358e8c1a 100644 --- a/net-mgmt/collectd/Makefile +++ b/net-mgmt/collectd/Makefile @@ -3,7 +3,7 @@ PORTNAME= collectd PORTVERSION= 4.10.9 -PORTREVISION= 14 +PORTREVISION= 15 CATEGORIES= net-mgmt MASTER_SITES= http://collectd.org/files/ @@ -16,6 +16,7 @@ LIB_DEPENDS= libltdl.so:${PORTSDIR}/devel/libltdl GNU_CONFIGURE= yes USES= autoreconf gmake libtool +INSTALL_TARGET= install-strip OPTIONS_DEFINE= CGI BIND DEBUG GCRYPT LIBVIRT OPTIONS_GROUP= INPUT OUTPUT diff --git a/net-mgmt/collectd/files/patch-src__interface.c b/net-mgmt/collectd/files/patch-src__interface.c new file mode 100644 index 00000000000..f2ad3d2bb60 --- /dev/null +++ b/net-mgmt/collectd/files/patch-src__interface.c @@ -0,0 +1,36 @@ +--- src/interface.c.orig 2014-01-05 00:36:58.000000000 +0400 ++++ src/interface.c 2014-01-05 00:45:10.000000000 +0400 +@@ -212,20 +212,19 @@ static int interface_read (void) + return (-1); + + for (if_ptr = if_list; if_ptr != NULL; if_ptr = if_ptr->ifa_next) +- { +- if ((if_data = (struct IFA_DATA *) if_ptr->ifa_data) == NULL) +- continue; +- +- if_submit (if_ptr->ifa_name, "if_octets", +- if_data->IFA_RX_BYTES, +- if_data->IFA_TX_BYTES); +- if_submit (if_ptr->ifa_name, "if_packets", +- if_data->IFA_RX_PACKT, +- if_data->IFA_TX_PACKT); +- if_submit (if_ptr->ifa_name, "if_errors", +- if_data->IFA_RX_ERROR, +- if_data->IFA_TX_ERROR); +- } ++ if (if_ptr->ifa_addr != NULL && if_ptr->ifa_addr->sa_family == AF_LINK) { ++ if_data = (struct IFA_DATA *) if_ptr->ifa_data; ++ ++ if_submit (if_ptr->ifa_name, "if_octets", ++ if_data->IFA_RX_BYTES, ++ if_data->IFA_TX_BYTES); ++ if_submit (if_ptr->ifa_name, "if_packets", ++ if_data->IFA_RX_PACKT, ++ if_data->IFA_TX_PACKT); ++ if_submit (if_ptr->ifa_name, "if_errors", ++ if_data->IFA_RX_ERROR, ++ if_data->IFA_TX_ERROR); ++ } + + freeifaddrs (if_list); + /* #endif HAVE_GETIFADDRS */ diff --git a/net-mgmt/collectd/pkg-plist b/net-mgmt/collectd/pkg-plist index c3ea6fd0f35..712befc6633 100644 --- a/net-mgmt/collectd/pkg-plist +++ b/net-mgmt/collectd/pkg-plist @@ -4,7 +4,6 @@ sbin/collectdmon @sample etc/collectd.conf.sample %%CGI%%%%WWWDIR%%/collection.cgi %%CGI%%@sample %%WWWDIR%%/collection.conf.sample -%%CGI%%@dirrmtry %%WWWDIR%% bin/collectd-nagios lib/libcollectdclient.so lib/libcollectdclient.so.0 @@ -76,6 +75,3 @@ man/man5/collectd.conf.5.gz man/man5/types.db.5.gz %%DATADIR%%/postgresql_default.conf %%DATADIR%%/types.db -@dirrm lib/collectd -@dirrm include/collectd -@dirrm %%DATADIR%% |