diff options
author | kuriyama <kuriyama@FreeBSD.org> | 2008-08-10 22:48:06 +0800 |
---|---|---|
committer | kuriyama <kuriyama@FreeBSD.org> | 2008-08-10 22:48:06 +0800 |
commit | 4d48b5724f2f016441087e5a50203ed1ddb5d247 (patch) | |
tree | 8d20a3fb5ebfe47117158ac805d23a3cf368ab81 /net-mgmt/net-snmp-devel | |
parent | eee442840dd345760c069f919e550865a09d01a2 (diff) | |
download | freebsd-ports-gnome-4d48b5724f2f016441087e5a50203ed1ddb5d247.tar.gz freebsd-ports-gnome-4d48b5724f2f016441087e5a50203ed1ddb5d247.tar.zst freebsd-ports-gnome-4d48b5724f2f016441087e5a50203ed1ddb5d247.zip |
o Make dir /var/agentx for AgnetX sockets [1].
o Include zfs mount points for disk reports.
Reported by: bms [1]
Diffstat (limited to 'net-mgmt/net-snmp-devel')
-rw-r--r-- | net-mgmt/net-snmp-devel/Makefile | 2 | ||||
-rw-r--r-- | net-mgmt/net-snmp-devel/files/patch-disk.c | 31 | ||||
-rw-r--r-- | net-mgmt/net-snmp-devel/pkg-plist | 2 |
3 files changed, 35 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 |