mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
HEADS UP: After this commit, snmpd is not enabled by default.
See pkg-message for details. * Use /etc/rc.conf variables to control snmpd invocation. * Add some make variables to set default values. Requested by: many people :-)
This commit is contained in:
parent
98c24fc5d8
commit
87a8145c93
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=66465
16 changed files with 240 additions and 36 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= net-snmp
|
||||
PORTVERSION= 5.0.3
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= net ipv6
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
|
||||
ftp://sunsite.cnlab-switch.ch/mirror/ucd-snmp/ \
|
||||
|
@ -23,6 +23,11 @@ LIBTOOLFLAGS= --disable-ltlibs --release-ignore
|
|||
NO_LATEST_LINK= yes
|
||||
|
||||
CONFIGURE_ARGS+= --enable-shared --with-mib-modules="host ucd-snmp/diskio" \
|
||||
--with-default-snmp-version="${DEFAULT_SNMP_VERSION}" \
|
||||
--with-sys-contact="${NET_SNMP_SYS_CONTACT}" \
|
||||
--with-sys-location="${NET_SNMP_SYS_LOCATION}" \
|
||||
--with-logfile="${NET_SNMP_LOGFILE}" \
|
||||
--with-persistent-directory="${NET_SNMP_PERSISTENTDIR}" \
|
||||
--with-gnu-ld --with-libwrap --with-libs="-lkvm -ldevstat"
|
||||
.if defined(BATCH)
|
||||
CONFIGURE_ARGS+= --with-defaults --with-sys-contact=nobody@no.where
|
||||
|
@ -30,6 +35,12 @@ CONFIGURE_ARGS+= --with-defaults --with-sys-contact=nobody@no.where
|
|||
IS_INTERACTIVE= yes
|
||||
.endif
|
||||
|
||||
DEFAULT_SNMP_VERSION?= 3
|
||||
NET_SNMP_SYS_CONTACT?= nobody@no.where
|
||||
NET_SNMP_SYS_LOCATION?=
|
||||
NET_SNMP_LOGFILE?= /var/log/snmpd.log
|
||||
NET_SNMP_PERSISTENTDIR?=/var/net-snmp
|
||||
|
||||
MAN1= mib2c.1 \
|
||||
snmpbulkget.1 snmpbulkwalk.1 snmpcmd.1 snmpconf.1 snmpd.1 \
|
||||
snmpdelta.1 snmpdf.1 snmpget.1 snmpgetnext.1 snmpinform.1 \
|
||||
|
@ -81,15 +92,17 @@ PLIST_SUB+= shlib=${SHLIB_VERSION}
|
|||
post-patch:
|
||||
@${PERL} -pi -e "s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/aclocal.m4
|
||||
|
||||
pre-install:
|
||||
-@[ -f ${STARTUP_FILE} ] && \
|
||||
(echo "Remove old ${STARTUP_FILE} before install." && exit 1)
|
||||
|
||||
post-install:
|
||||
@( cd ${PREFIX}/bin && ${STRIP_CMD} ${BIN} )
|
||||
@( cd ${PREFIX}/sbin && ${STRIP_CMD} ${SBIN} )
|
||||
@${FIND} ${PREFIX}/include/net-snmp ${PREFIX}/share/snmp/mibs -type f \
|
||||
| ${XARGS} ${CHMOD} 644
|
||||
@${INSTALL_SCRIPT} -m 751 ${FILESDIR}/snmpd.sh.sample ${PREFIX}/etc/rc.d
|
||||
@if [ ! -f ${STARTUP_FILE} ]; then \
|
||||
${ECHO} "Creating ${PREFIX}/etc/rc.d/snmpd.sh startup file."; \
|
||||
${INSTALL_SCRIPT} -m 751 ${FILESDIR}/snmpd.sh.sample ${STARTUP_FILE}; \
|
||||
fi
|
||||
@${INSTALL_SCRIPT} -m 751 ${FILESDIR}/snmpd.sh.sample ${STARTUP_FILE}
|
||||
@${ECHO_MSG}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
|
|
@ -1,13 +1,29 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
|
||||
echo "$0: Cannot determine the PREFIX" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${source_rc_confs_defined}" ]; then
|
||||
if [ -r /etc/defaults/rc.conf ]; then
|
||||
. /etc/defaults/rc.conf
|
||||
source_rc_confs
|
||||
elif [ -r /etc/rc.conf ]; then
|
||||
. /etc/rc.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ -x ${PREFIX}/sbin/snmpd ] && ${PREFIX}/sbin/snmpd && echo -n ' snmpd'
|
||||
case "${net_snmpd_enable}" in
|
||||
[Yy][Ee][Ss])
|
||||
echo -n ' snmpd'
|
||||
${net_snmpd_program:-${PREFIX}/sbin/snmpd} ${net_snmpd_flags}
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
killall snmpd && echo -n ' snmpd'
|
||||
|
|
23
net-mgmt/net-snmp-devel/pkg-message
Normal file
23
net-mgmt/net-snmp-devel/pkg-message
Normal file
|
@ -0,0 +1,23 @@
|
|||
**** This port installs snmp daemon, include files and libraries but not
|
||||
invoking snmpd by default.
|
||||
If you want to invoke snmpd from startup, put these lines into
|
||||
/etc/rc.conf.
|
||||
|
||||
net_snmpd_enable="YES"
|
||||
net_snmpd_flags=""
|
||||
|
||||
**** You can specify make variables as:
|
||||
|
||||
NET_SNMP_SYS_CONTACT="kuriyama@FreeBSD.org"
|
||||
NET_SNMP_SYS_LOCATION="Tokyo, Japan"
|
||||
DEFAULT_SNMP_VERSION=3
|
||||
NET_SNMP_LOGFILE=/var/log/snmpd.log
|
||||
NET_SNMP_PERSISTENTDIR=/var/net-snmp
|
||||
|
||||
to define default values (or overwriting defaults). At least
|
||||
setting first two variables, you will not be prompted during
|
||||
configuration process. Or you can set
|
||||
|
||||
BATCH="yes"
|
||||
|
||||
to make to avoid interactive configuration.
|
|
@ -23,8 +23,7 @@ bin/snmpusm
|
|||
bin/snmpvacm
|
||||
bin/snmpwalk
|
||||
bin/traptoemail
|
||||
@unexec if cmp -s %D/etc/snmpd.sh %D/etc/snmpd.sh.sample; then rm -f %D/etc/snmpd.sh; fi
|
||||
etc/rc.d/snmpd.sh.sample
|
||||
etc/rc.d/snmpd.sh
|
||||
include/net-snmp/agent/agent_callbacks.h
|
||||
include/net-snmp/agent/agent_handler.h
|
||||
include/net-snmp/agent/agent_index.h
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= net-snmp
|
||||
PORTVERSION= 5.0.3
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= net ipv6
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
|
||||
ftp://sunsite.cnlab-switch.ch/mirror/ucd-snmp/ \
|
||||
|
@ -23,6 +23,11 @@ LIBTOOLFLAGS= --disable-ltlibs --release-ignore
|
|||
NO_LATEST_LINK= yes
|
||||
|
||||
CONFIGURE_ARGS+= --enable-shared --with-mib-modules="host ucd-snmp/diskio" \
|
||||
--with-default-snmp-version="${DEFAULT_SNMP_VERSION}" \
|
||||
--with-sys-contact="${NET_SNMP_SYS_CONTACT}" \
|
||||
--with-sys-location="${NET_SNMP_SYS_LOCATION}" \
|
||||
--with-logfile="${NET_SNMP_LOGFILE}" \
|
||||
--with-persistent-directory="${NET_SNMP_PERSISTENTDIR}" \
|
||||
--with-gnu-ld --with-libwrap --with-libs="-lkvm -ldevstat"
|
||||
.if defined(BATCH)
|
||||
CONFIGURE_ARGS+= --with-defaults --with-sys-contact=nobody@no.where
|
||||
|
@ -30,6 +35,12 @@ CONFIGURE_ARGS+= --with-defaults --with-sys-contact=nobody@no.where
|
|||
IS_INTERACTIVE= yes
|
||||
.endif
|
||||
|
||||
DEFAULT_SNMP_VERSION?= 3
|
||||
NET_SNMP_SYS_CONTACT?= nobody@no.where
|
||||
NET_SNMP_SYS_LOCATION?=
|
||||
NET_SNMP_LOGFILE?= /var/log/snmpd.log
|
||||
NET_SNMP_PERSISTENTDIR?=/var/net-snmp
|
||||
|
||||
MAN1= mib2c.1 \
|
||||
snmpbulkget.1 snmpbulkwalk.1 snmpcmd.1 snmpconf.1 snmpd.1 \
|
||||
snmpdelta.1 snmpdf.1 snmpget.1 snmpgetnext.1 snmpinform.1 \
|
||||
|
@ -81,15 +92,17 @@ PLIST_SUB+= shlib=${SHLIB_VERSION}
|
|||
post-patch:
|
||||
@${PERL} -pi -e "s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/aclocal.m4
|
||||
|
||||
pre-install:
|
||||
-@[ -f ${STARTUP_FILE} ] && \
|
||||
(echo "Remove old ${STARTUP_FILE} before install." && exit 1)
|
||||
|
||||
post-install:
|
||||
@( cd ${PREFIX}/bin && ${STRIP_CMD} ${BIN} )
|
||||
@( cd ${PREFIX}/sbin && ${STRIP_CMD} ${SBIN} )
|
||||
@${FIND} ${PREFIX}/include/net-snmp ${PREFIX}/share/snmp/mibs -type f \
|
||||
| ${XARGS} ${CHMOD} 644
|
||||
@${INSTALL_SCRIPT} -m 751 ${FILESDIR}/snmpd.sh.sample ${PREFIX}/etc/rc.d
|
||||
@if [ ! -f ${STARTUP_FILE} ]; then \
|
||||
${ECHO} "Creating ${PREFIX}/etc/rc.d/snmpd.sh startup file."; \
|
||||
${INSTALL_SCRIPT} -m 751 ${FILESDIR}/snmpd.sh.sample ${STARTUP_FILE}; \
|
||||
fi
|
||||
@${INSTALL_SCRIPT} -m 751 ${FILESDIR}/snmpd.sh.sample ${STARTUP_FILE}
|
||||
@${ECHO_MSG}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
|
|
@ -1,13 +1,29 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
|
||||
echo "$0: Cannot determine the PREFIX" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${source_rc_confs_defined}" ]; then
|
||||
if [ -r /etc/defaults/rc.conf ]; then
|
||||
. /etc/defaults/rc.conf
|
||||
source_rc_confs
|
||||
elif [ -r /etc/rc.conf ]; then
|
||||
. /etc/rc.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ -x ${PREFIX}/sbin/snmpd ] && ${PREFIX}/sbin/snmpd && echo -n ' snmpd'
|
||||
case "${net_snmpd_enable}" in
|
||||
[Yy][Ee][Ss])
|
||||
echo -n ' snmpd'
|
||||
${net_snmpd_program:-${PREFIX}/sbin/snmpd} ${net_snmpd_flags}
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
killall snmpd && echo -n ' snmpd'
|
||||
|
|
23
net-mgmt/net-snmp/pkg-message
Normal file
23
net-mgmt/net-snmp/pkg-message
Normal file
|
@ -0,0 +1,23 @@
|
|||
**** This port installs snmp daemon, include files and libraries but not
|
||||
invoking snmpd by default.
|
||||
If you want to invoke snmpd from startup, put these lines into
|
||||
/etc/rc.conf.
|
||||
|
||||
net_snmpd_enable="YES"
|
||||
net_snmpd_flags=""
|
||||
|
||||
**** You can specify make variables as:
|
||||
|
||||
NET_SNMP_SYS_CONTACT="kuriyama@FreeBSD.org"
|
||||
NET_SNMP_SYS_LOCATION="Tokyo, Japan"
|
||||
DEFAULT_SNMP_VERSION=3
|
||||
NET_SNMP_LOGFILE=/var/log/snmpd.log
|
||||
NET_SNMP_PERSISTENTDIR=/var/net-snmp
|
||||
|
||||
to define default values (or overwriting defaults). At least
|
||||
setting first two variables, you will not be prompted during
|
||||
configuration process. Or you can set
|
||||
|
||||
BATCH="yes"
|
||||
|
||||
to make to avoid interactive configuration.
|
|
@ -23,8 +23,7 @@ bin/snmpusm
|
|||
bin/snmpvacm
|
||||
bin/snmpwalk
|
||||
bin/traptoemail
|
||||
@unexec if cmp -s %D/etc/snmpd.sh %D/etc/snmpd.sh.sample; then rm -f %D/etc/snmpd.sh; fi
|
||||
etc/rc.d/snmpd.sh.sample
|
||||
etc/rc.d/snmpd.sh
|
||||
include/net-snmp/agent/agent_callbacks.h
|
||||
include/net-snmp/agent/agent_handler.h
|
||||
include/net-snmp/agent/agent_index.h
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= net-snmp
|
||||
PORTVERSION= 5.0.3
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= net ipv6
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
|
||||
ftp://sunsite.cnlab-switch.ch/mirror/ucd-snmp/ \
|
||||
|
@ -23,6 +23,11 @@ LIBTOOLFLAGS= --disable-ltlibs --release-ignore
|
|||
NO_LATEST_LINK= yes
|
||||
|
||||
CONFIGURE_ARGS+= --enable-shared --with-mib-modules="host ucd-snmp/diskio" \
|
||||
--with-default-snmp-version="${DEFAULT_SNMP_VERSION}" \
|
||||
--with-sys-contact="${NET_SNMP_SYS_CONTACT}" \
|
||||
--with-sys-location="${NET_SNMP_SYS_LOCATION}" \
|
||||
--with-logfile="${NET_SNMP_LOGFILE}" \
|
||||
--with-persistent-directory="${NET_SNMP_PERSISTENTDIR}" \
|
||||
--with-gnu-ld --with-libwrap --with-libs="-lkvm -ldevstat"
|
||||
.if defined(BATCH)
|
||||
CONFIGURE_ARGS+= --with-defaults --with-sys-contact=nobody@no.where
|
||||
|
@ -30,6 +35,12 @@ CONFIGURE_ARGS+= --with-defaults --with-sys-contact=nobody@no.where
|
|||
IS_INTERACTIVE= yes
|
||||
.endif
|
||||
|
||||
DEFAULT_SNMP_VERSION?= 3
|
||||
NET_SNMP_SYS_CONTACT?= nobody@no.where
|
||||
NET_SNMP_SYS_LOCATION?=
|
||||
NET_SNMP_LOGFILE?= /var/log/snmpd.log
|
||||
NET_SNMP_PERSISTENTDIR?=/var/net-snmp
|
||||
|
||||
MAN1= mib2c.1 \
|
||||
snmpbulkget.1 snmpbulkwalk.1 snmpcmd.1 snmpconf.1 snmpd.1 \
|
||||
snmpdelta.1 snmpdf.1 snmpget.1 snmpgetnext.1 snmpinform.1 \
|
||||
|
@ -81,15 +92,17 @@ PLIST_SUB+= shlib=${SHLIB_VERSION}
|
|||
post-patch:
|
||||
@${PERL} -pi -e "s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/aclocal.m4
|
||||
|
||||
pre-install:
|
||||
-@[ -f ${STARTUP_FILE} ] && \
|
||||
(echo "Remove old ${STARTUP_FILE} before install." && exit 1)
|
||||
|
||||
post-install:
|
||||
@( cd ${PREFIX}/bin && ${STRIP_CMD} ${BIN} )
|
||||
@( cd ${PREFIX}/sbin && ${STRIP_CMD} ${SBIN} )
|
||||
@${FIND} ${PREFIX}/include/net-snmp ${PREFIX}/share/snmp/mibs -type f \
|
||||
| ${XARGS} ${CHMOD} 644
|
||||
@${INSTALL_SCRIPT} -m 751 ${FILESDIR}/snmpd.sh.sample ${PREFIX}/etc/rc.d
|
||||
@if [ ! -f ${STARTUP_FILE} ]; then \
|
||||
${ECHO} "Creating ${PREFIX}/etc/rc.d/snmpd.sh startup file."; \
|
||||
${INSTALL_SCRIPT} -m 751 ${FILESDIR}/snmpd.sh.sample ${STARTUP_FILE}; \
|
||||
fi
|
||||
@${INSTALL_SCRIPT} -m 751 ${FILESDIR}/snmpd.sh.sample ${STARTUP_FILE}
|
||||
@${ECHO_MSG}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
|
|
@ -1,13 +1,29 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
|
||||
echo "$0: Cannot determine the PREFIX" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${source_rc_confs_defined}" ]; then
|
||||
if [ -r /etc/defaults/rc.conf ]; then
|
||||
. /etc/defaults/rc.conf
|
||||
source_rc_confs
|
||||
elif [ -r /etc/rc.conf ]; then
|
||||
. /etc/rc.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ -x ${PREFIX}/sbin/snmpd ] && ${PREFIX}/sbin/snmpd && echo -n ' snmpd'
|
||||
case "${net_snmpd_enable}" in
|
||||
[Yy][Ee][Ss])
|
||||
echo -n ' snmpd'
|
||||
${net_snmpd_program:-${PREFIX}/sbin/snmpd} ${net_snmpd_flags}
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
killall snmpd && echo -n ' snmpd'
|
||||
|
|
23
net-mgmt/net-snmp53/pkg-message
Normal file
23
net-mgmt/net-snmp53/pkg-message
Normal file
|
@ -0,0 +1,23 @@
|
|||
**** This port installs snmp daemon, include files and libraries but not
|
||||
invoking snmpd by default.
|
||||
If you want to invoke snmpd from startup, put these lines into
|
||||
/etc/rc.conf.
|
||||
|
||||
net_snmpd_enable="YES"
|
||||
net_snmpd_flags=""
|
||||
|
||||
**** You can specify make variables as:
|
||||
|
||||
NET_SNMP_SYS_CONTACT="kuriyama@FreeBSD.org"
|
||||
NET_SNMP_SYS_LOCATION="Tokyo, Japan"
|
||||
DEFAULT_SNMP_VERSION=3
|
||||
NET_SNMP_LOGFILE=/var/log/snmpd.log
|
||||
NET_SNMP_PERSISTENTDIR=/var/net-snmp
|
||||
|
||||
to define default values (or overwriting defaults). At least
|
||||
setting first two variables, you will not be prompted during
|
||||
configuration process. Or you can set
|
||||
|
||||
BATCH="yes"
|
||||
|
||||
to make to avoid interactive configuration.
|
|
@ -23,8 +23,7 @@ bin/snmpusm
|
|||
bin/snmpvacm
|
||||
bin/snmpwalk
|
||||
bin/traptoemail
|
||||
@unexec if cmp -s %D/etc/snmpd.sh %D/etc/snmpd.sh.sample; then rm -f %D/etc/snmpd.sh; fi
|
||||
etc/rc.d/snmpd.sh.sample
|
||||
etc/rc.d/snmpd.sh
|
||||
include/net-snmp/agent/agent_callbacks.h
|
||||
include/net-snmp/agent/agent_handler.h
|
||||
include/net-snmp/agent/agent_index.h
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= net-snmp
|
||||
PORTVERSION= 5.0.3
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= net ipv6
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
|
||||
ftp://sunsite.cnlab-switch.ch/mirror/ucd-snmp/ \
|
||||
|
@ -23,6 +23,11 @@ LIBTOOLFLAGS= --disable-ltlibs --release-ignore
|
|||
NO_LATEST_LINK= yes
|
||||
|
||||
CONFIGURE_ARGS+= --enable-shared --with-mib-modules="host ucd-snmp/diskio" \
|
||||
--with-default-snmp-version="${DEFAULT_SNMP_VERSION}" \
|
||||
--with-sys-contact="${NET_SNMP_SYS_CONTACT}" \
|
||||
--with-sys-location="${NET_SNMP_SYS_LOCATION}" \
|
||||
--with-logfile="${NET_SNMP_LOGFILE}" \
|
||||
--with-persistent-directory="${NET_SNMP_PERSISTENTDIR}" \
|
||||
--with-gnu-ld --with-libwrap --with-libs="-lkvm -ldevstat"
|
||||
.if defined(BATCH)
|
||||
CONFIGURE_ARGS+= --with-defaults --with-sys-contact=nobody@no.where
|
||||
|
@ -30,6 +35,12 @@ CONFIGURE_ARGS+= --with-defaults --with-sys-contact=nobody@no.where
|
|||
IS_INTERACTIVE= yes
|
||||
.endif
|
||||
|
||||
DEFAULT_SNMP_VERSION?= 3
|
||||
NET_SNMP_SYS_CONTACT?= nobody@no.where
|
||||
NET_SNMP_SYS_LOCATION?=
|
||||
NET_SNMP_LOGFILE?= /var/log/snmpd.log
|
||||
NET_SNMP_PERSISTENTDIR?=/var/net-snmp
|
||||
|
||||
MAN1= mib2c.1 \
|
||||
snmpbulkget.1 snmpbulkwalk.1 snmpcmd.1 snmpconf.1 snmpd.1 \
|
||||
snmpdelta.1 snmpdf.1 snmpget.1 snmpgetnext.1 snmpinform.1 \
|
||||
|
@ -81,15 +92,17 @@ PLIST_SUB+= shlib=${SHLIB_VERSION}
|
|||
post-patch:
|
||||
@${PERL} -pi -e "s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/aclocal.m4
|
||||
|
||||
pre-install:
|
||||
-@[ -f ${STARTUP_FILE} ] && \
|
||||
(echo "Remove old ${STARTUP_FILE} before install." && exit 1)
|
||||
|
||||
post-install:
|
||||
@( cd ${PREFIX}/bin && ${STRIP_CMD} ${BIN} )
|
||||
@( cd ${PREFIX}/sbin && ${STRIP_CMD} ${SBIN} )
|
||||
@${FIND} ${PREFIX}/include/net-snmp ${PREFIX}/share/snmp/mibs -type f \
|
||||
| ${XARGS} ${CHMOD} 644
|
||||
@${INSTALL_SCRIPT} -m 751 ${FILESDIR}/snmpd.sh.sample ${PREFIX}/etc/rc.d
|
||||
@if [ ! -f ${STARTUP_FILE} ]; then \
|
||||
${ECHO} "Creating ${PREFIX}/etc/rc.d/snmpd.sh startup file."; \
|
||||
${INSTALL_SCRIPT} -m 751 ${FILESDIR}/snmpd.sh.sample ${STARTUP_FILE}; \
|
||||
fi
|
||||
@${INSTALL_SCRIPT} -m 751 ${FILESDIR}/snmpd.sh.sample ${STARTUP_FILE}
|
||||
@${ECHO_MSG}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
|
|
@ -1,13 +1,29 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
|
||||
echo "$0: Cannot determine the PREFIX" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${source_rc_confs_defined}" ]; then
|
||||
if [ -r /etc/defaults/rc.conf ]; then
|
||||
. /etc/defaults/rc.conf
|
||||
source_rc_confs
|
||||
elif [ -r /etc/rc.conf ]; then
|
||||
. /etc/rc.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ -x ${PREFIX}/sbin/snmpd ] && ${PREFIX}/sbin/snmpd && echo -n ' snmpd'
|
||||
case "${net_snmpd_enable}" in
|
||||
[Yy][Ee][Ss])
|
||||
echo -n ' snmpd'
|
||||
${net_snmpd_program:-${PREFIX}/sbin/snmpd} ${net_snmpd_flags}
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
killall snmpd && echo -n ' snmpd'
|
||||
|
|
23
net/net-snmp/pkg-message
Normal file
23
net/net-snmp/pkg-message
Normal file
|
@ -0,0 +1,23 @@
|
|||
**** This port installs snmp daemon, include files and libraries but not
|
||||
invoking snmpd by default.
|
||||
If you want to invoke snmpd from startup, put these lines into
|
||||
/etc/rc.conf.
|
||||
|
||||
net_snmpd_enable="YES"
|
||||
net_snmpd_flags=""
|
||||
|
||||
**** You can specify make variables as:
|
||||
|
||||
NET_SNMP_SYS_CONTACT="kuriyama@FreeBSD.org"
|
||||
NET_SNMP_SYS_LOCATION="Tokyo, Japan"
|
||||
DEFAULT_SNMP_VERSION=3
|
||||
NET_SNMP_LOGFILE=/var/log/snmpd.log
|
||||
NET_SNMP_PERSISTENTDIR=/var/net-snmp
|
||||
|
||||
to define default values (or overwriting defaults). At least
|
||||
setting first two variables, you will not be prompted during
|
||||
configuration process. Or you can set
|
||||
|
||||
BATCH="yes"
|
||||
|
||||
to make to avoid interactive configuration.
|
|
@ -23,8 +23,7 @@ bin/snmpusm
|
|||
bin/snmpvacm
|
||||
bin/snmpwalk
|
||||
bin/traptoemail
|
||||
@unexec if cmp -s %D/etc/snmpd.sh %D/etc/snmpd.sh.sample; then rm -f %D/etc/snmpd.sh; fi
|
||||
etc/rc.d/snmpd.sh.sample
|
||||
etc/rc.d/snmpd.sh
|
||||
include/net-snmp/agent/agent_callbacks.h
|
||||
include/net-snmp/agent/agent_handler.h
|
||||
include/net-snmp/agent/agent_index.h
|
||||
|
|
Loading…
Add table
Reference in a new issue