aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt
diff options
context:
space:
mode:
authorJun Kuriyama <kuriyama@FreeBSD.org>2008-08-10 14:48:06 +0000
committerJun Kuriyama <kuriyama@FreeBSD.org>2008-08-10 14:48:06 +0000
commit21695c6079afb117684c4e107fa9ea4e3316d036 (patch)
tree58c8225168e8d31c72a2c4341ae897c863eede8f /net-mgmt
parentb6d56128a9ba548ae328f77cc972e541d59a6a42 (diff)
downloadports-21695c6079afb117684c4e107fa9ea4e3316d036.tar.gz
ports-21695c6079afb117684c4e107fa9ea4e3316d036.zip
Notes
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/net-snmp-devel/Makefile2
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-disk.c31
-rw-r--r--net-mgmt/net-snmp-devel/pkg-plist2
-rw-r--r--net-mgmt/net-snmp/Makefile2
-rw-r--r--net-mgmt/net-snmp/files/patch-disk.c31
-rw-r--r--net-mgmt/net-snmp/pkg-plist2
6 files changed, 70 insertions, 0 deletions
diff --git a/net-mgmt/net-snmp-devel/Makefile b/net-mgmt/net-snmp-devel/Makefile
index 08770cbc8302..bc2a07d5cf33 100644
--- a/net-mgmt/net-snmp-devel/Makefile
+++ b/net-mgmt/net-snmp-devel/Makefile
@@ -7,6 +7,7 @@
PORTNAME= snmp
PORTVERSION= 5.4.1.2
+PORTREVISION= 1
CATEGORIES= net-mgmt ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= net-snmp
@@ -265,6 +266,7 @@ post-build:
.endif
post-install: strip-files install-config-files install-doc-files display-message
+ ${MKDIR} /var/agentx
strip-files:
@cd ${PREFIX}/bin; ${STRIP_CMD} ${BIN_FILES}
diff --git a/net-mgmt/net-snmp-devel/files/patch-disk.c b/net-mgmt/net-snmp-devel/files/patch-disk.c
new file mode 100644
index 000000000000..d58269d1e08d
--- /dev/null
+++ b/net-mgmt/net-snmp-devel/files/patch-disk.c
@@ -0,0 +1,31 @@
+--- agent/mibgroup/ucd-snmp/disk.c.orig 2008-07-05 22:11:22.366362753 +0900
++++ agent/mibgroup/ucd-snmp/disk.c 2008-07-06 00:32:19.611196878 +0900
+@@ -73,6 +73,9 @@
+ #if HAVE_SYS_VFS_H
+ #include <sys/vfs.h>
+ #endif
++#if defined(__FreeBSD__) && __FreeBSD_version >= 700055
++#include <sys/ucred.h>
++#endif
+ #if defined(HAVE_STATFS)
+ #if HAVE_SYS_MOUNT_H
+ #include <sys/mount.h>
+@@ -491,6 +494,18 @@
+ dummy = 1;
+ }
+ endfsent(); /* close /etc/fstab */
++#if defined(__FreeBSD__) && __FreeBSD_version >= 700055
++ {
++ struct statfs *mntbuf;
++ size_t i, mntsize;
++ mntsize = getmntinfo(&mntbuf, MNT_NOWAIT);
++ for (i = 0; i < mntsize; i++) {
++ if (strncmp(mntbuf[i].f_fstypename, "zfs", 3) == 0) {
++ add_device(mntbuf[i].f_mntonname, mntbuf[i].f_mntfromname, -1, minpercent, 0);
++ }
++ }
++ }
++#endif
+ if(dummy != 0) {
+ /*
+ * dummy clause for else below
diff --git a/net-mgmt/net-snmp-devel/pkg-plist b/net-mgmt/net-snmp-devel/pkg-plist
index 5e4c2c135409..6d9ec599c68c 100644
--- a/net-mgmt/net-snmp-devel/pkg-plist
+++ b/net-mgmt/net-snmp-devel/pkg-plist
@@ -436,9 +436,11 @@ sbin/snmptrapd
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP
%%WITH_PERL%%@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/Bundle
+@exec mkdir /var/agentx
@dirrm include/net-snmp/system
@dirrm include/net-snmp/machine
@dirrm include/net-snmp/library
@dirrm include/net-snmp/agent
@dirrm include/net-snmp
@dirrmtry etc/snmp
+@unexec rmdir /var/agentx 2>/dev/null || true
diff --git a/net-mgmt/net-snmp/Makefile b/net-mgmt/net-snmp/Makefile
index 08770cbc8302..bc2a07d5cf33 100644
--- a/net-mgmt/net-snmp/Makefile
+++ b/net-mgmt/net-snmp/Makefile
@@ -7,6 +7,7 @@
PORTNAME= snmp
PORTVERSION= 5.4.1.2
+PORTREVISION= 1
CATEGORIES= net-mgmt ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= net-snmp
@@ -265,6 +266,7 @@ post-build:
.endif
post-install: strip-files install-config-files install-doc-files display-message
+ ${MKDIR} /var/agentx
strip-files:
@cd ${PREFIX}/bin; ${STRIP_CMD} ${BIN_FILES}
diff --git a/net-mgmt/net-snmp/files/patch-disk.c b/net-mgmt/net-snmp/files/patch-disk.c
new file mode 100644
index 000000000000..d58269d1e08d
--- /dev/null
+++ b/net-mgmt/net-snmp/files/patch-disk.c
@@ -0,0 +1,31 @@
+--- agent/mibgroup/ucd-snmp/disk.c.orig 2008-07-05 22:11:22.366362753 +0900
++++ agent/mibgroup/ucd-snmp/disk.c 2008-07-06 00:32:19.611196878 +0900
+@@ -73,6 +73,9 @@
+ #if HAVE_SYS_VFS_H
+ #include <sys/vfs.h>
+ #endif
++#if defined(__FreeBSD__) && __FreeBSD_version >= 700055
++#include <sys/ucred.h>
++#endif
+ #if defined(HAVE_STATFS)
+ #if HAVE_SYS_MOUNT_H
+ #include <sys/mount.h>
+@@ -491,6 +494,18 @@
+ dummy = 1;
+ }
+ endfsent(); /* close /etc/fstab */
++#if defined(__FreeBSD__) && __FreeBSD_version >= 700055
++ {
++ struct statfs *mntbuf;
++ size_t i, mntsize;
++ mntsize = getmntinfo(&mntbuf, MNT_NOWAIT);
++ for (i = 0; i < mntsize; i++) {
++ if (strncmp(mntbuf[i].f_fstypename, "zfs", 3) == 0) {
++ add_device(mntbuf[i].f_mntonname, mntbuf[i].f_mntfromname, -1, minpercent, 0);
++ }
++ }
++ }
++#endif
+ if(dummy != 0) {
+ /*
+ * dummy clause for else below
diff --git a/net-mgmt/net-snmp/pkg-plist b/net-mgmt/net-snmp/pkg-plist
index 5e4c2c135409..6d9ec599c68c 100644
--- a/net-mgmt/net-snmp/pkg-plist
+++ b/net-mgmt/net-snmp/pkg-plist
@@ -436,9 +436,11 @@ sbin/snmptrapd
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP
%%WITH_PERL%%@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/Bundle
+@exec mkdir /var/agentx
@dirrm include/net-snmp/system
@dirrm include/net-snmp/machine
@dirrm include/net-snmp/library
@dirrm include/net-snmp/agent
@dirrm include/net-snmp
@dirrmtry etc/snmp
+@unexec rmdir /var/agentx 2>/dev/null || true