Upgrade to 5.0.9.
Convert to use rc.subr script. Heads up! Variable name in /etc/rc.conf is changed to $snmpd_enable and $snmpd_flags. Old variables are imported for transition.
This commit is contained in:
parent
9104ffcf1c
commit
529f9db8eb
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=88629
12 changed files with 160 additions and 128 deletions
|
@ -6,8 +6,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= net-snmp
|
||||
PORTVERSION= 5.0.8
|
||||
PORTREVISION= 3
|
||||
PORTVERSION= 5.0.9
|
||||
CATEGORIES= net ipv6
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= net-snmp
|
||||
|
@ -15,6 +14,13 @@ MASTER_SITE_SUBDIR= net-snmp
|
|||
MAINTAINER= kuriyama@FreeBSD.org
|
||||
COMMENT= An extendable SNMP implementation
|
||||
|
||||
.if !exists(/etc/rc.subr)
|
||||
RUN_DEPENDS= ${LOCALBASE}/etc/rc.subr:${PORTSDIR}/sysutils/rc_subr
|
||||
RC_SUBR= ${LOCALBASE}/etc/rc.subr
|
||||
.else
|
||||
RC_SUBR= /etc/rc.subr
|
||||
.endif
|
||||
|
||||
USE_PERL5= yes
|
||||
USE_REINPLACE= yes
|
||||
USE_AUTOCONF_VER=213
|
||||
|
@ -99,6 +105,7 @@ CONFIGURE_ARGS+= --enable-ipv6 \
|
|||
|
||||
SHLIB_VERSION= 5
|
||||
PLIST_SUB+= shlib=${SHLIB_VERSION}
|
||||
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} \
|
||||
|
@ -119,7 +126,9 @@ post-install:
|
|||
@( 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 ${STARTUP_FILE}
|
||||
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
|
||||
${FILESDIR}/snmpd.sh.sample > ${STARTUP_FILE}
|
||||
@${CHMOD} 755 ${STARTUP_FILE}
|
||||
@${ECHO_MSG}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
MD5 (net-snmp-5.0.8.tar.gz) = 9fa8555c1a9d68008b3b0df52721ee82
|
||||
MD5 (net-snmp-5.0.9.tar.gz) = cecd5ec74f5c546c1ea7ed7987b5932b
|
||||
|
|
|
@ -1,36 +1,35 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: snmpd
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: FreeBSD
|
||||
#
|
||||
# Add the following line to /etc/rc.conf to enable snmpd:
|
||||
#
|
||||
# snmpd_enable="YES"
|
||||
#
|
||||
|
||||
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
|
||||
echo "$0: Cannot determine the PREFIX" >&2
|
||||
exit 1
|
||||
snmpd_enable="NO"
|
||||
snmpd_flags="-P /var/run/snmpd.pid"
|
||||
|
||||
. %%RC_SUBR%%
|
||||
|
||||
load_rc_config net_snmpd
|
||||
|
||||
if [ ! -z "$net_snmpd_enable" ]; then
|
||||
echo "Warning: \$net_snmpd_enable is obsoleted."
|
||||
echo " Use \$snmpd_enable instead."
|
||||
snmpd_enable="$net_snmpd_enable"
|
||||
[ ! -z "$net_snmpd_flags" ] && snmpd_flags="$net_snmpd_flags"
|
||||
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
|
||||
name=snmpd
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
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'
|
||||
;;
|
||||
*)
|
||||
echo "Usage: `basename $0` {start|stop}" >&2
|
||||
;;
|
||||
esac
|
||||
command=%%PREFIX%%/sbin/snmpd
|
||||
pidfile='/var/run/snmpd.pid'
|
||||
|
||||
exit 0
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= net-snmp
|
||||
PORTVERSION= 5.0.8
|
||||
PORTREVISION= 3
|
||||
PORTVERSION= 5.0.9
|
||||
CATEGORIES= net ipv6
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= net-snmp
|
||||
|
@ -15,6 +14,13 @@ MASTER_SITE_SUBDIR= net-snmp
|
|||
MAINTAINER= kuriyama@FreeBSD.org
|
||||
COMMENT= An extendable SNMP implementation
|
||||
|
||||
.if !exists(/etc/rc.subr)
|
||||
RUN_DEPENDS= ${LOCALBASE}/etc/rc.subr:${PORTSDIR}/sysutils/rc_subr
|
||||
RC_SUBR= ${LOCALBASE}/etc/rc.subr
|
||||
.else
|
||||
RC_SUBR= /etc/rc.subr
|
||||
.endif
|
||||
|
||||
USE_PERL5= yes
|
||||
USE_REINPLACE= yes
|
||||
USE_AUTOCONF_VER=213
|
||||
|
@ -99,6 +105,7 @@ CONFIGURE_ARGS+= --enable-ipv6 \
|
|||
|
||||
SHLIB_VERSION= 5
|
||||
PLIST_SUB+= shlib=${SHLIB_VERSION}
|
||||
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} \
|
||||
|
@ -119,7 +126,9 @@ post-install:
|
|||
@( 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 ${STARTUP_FILE}
|
||||
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
|
||||
${FILESDIR}/snmpd.sh.sample > ${STARTUP_FILE}
|
||||
@${CHMOD} 755 ${STARTUP_FILE}
|
||||
@${ECHO_MSG}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
MD5 (net-snmp-5.0.8.tar.gz) = 9fa8555c1a9d68008b3b0df52721ee82
|
||||
MD5 (net-snmp-5.0.9.tar.gz) = cecd5ec74f5c546c1ea7ed7987b5932b
|
||||
|
|
|
@ -1,36 +1,35 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: snmpd
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: FreeBSD
|
||||
#
|
||||
# Add the following line to /etc/rc.conf to enable snmpd:
|
||||
#
|
||||
# snmpd_enable="YES"
|
||||
#
|
||||
|
||||
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
|
||||
echo "$0: Cannot determine the PREFIX" >&2
|
||||
exit 1
|
||||
snmpd_enable="NO"
|
||||
snmpd_flags="-P /var/run/snmpd.pid"
|
||||
|
||||
. %%RC_SUBR%%
|
||||
|
||||
load_rc_config net_snmpd
|
||||
|
||||
if [ ! -z "$net_snmpd_enable" ]; then
|
||||
echo "Warning: \$net_snmpd_enable is obsoleted."
|
||||
echo " Use \$snmpd_enable instead."
|
||||
snmpd_enable="$net_snmpd_enable"
|
||||
[ ! -z "$net_snmpd_flags" ] && snmpd_flags="$net_snmpd_flags"
|
||||
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
|
||||
name=snmpd
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
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'
|
||||
;;
|
||||
*)
|
||||
echo "Usage: `basename $0` {start|stop}" >&2
|
||||
;;
|
||||
esac
|
||||
command=%%PREFIX%%/sbin/snmpd
|
||||
pidfile='/var/run/snmpd.pid'
|
||||
|
||||
exit 0
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= net-snmp
|
||||
PORTVERSION= 5.0.8
|
||||
PORTREVISION= 3
|
||||
PORTVERSION= 5.0.9
|
||||
CATEGORIES= net ipv6
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= net-snmp
|
||||
|
@ -15,6 +14,13 @@ MASTER_SITE_SUBDIR= net-snmp
|
|||
MAINTAINER= kuriyama@FreeBSD.org
|
||||
COMMENT= An extendable SNMP implementation
|
||||
|
||||
.if !exists(/etc/rc.subr)
|
||||
RUN_DEPENDS= ${LOCALBASE}/etc/rc.subr:${PORTSDIR}/sysutils/rc_subr
|
||||
RC_SUBR= ${LOCALBASE}/etc/rc.subr
|
||||
.else
|
||||
RC_SUBR= /etc/rc.subr
|
||||
.endif
|
||||
|
||||
USE_PERL5= yes
|
||||
USE_REINPLACE= yes
|
||||
USE_AUTOCONF_VER=213
|
||||
|
@ -99,6 +105,7 @@ CONFIGURE_ARGS+= --enable-ipv6 \
|
|||
|
||||
SHLIB_VERSION= 5
|
||||
PLIST_SUB+= shlib=${SHLIB_VERSION}
|
||||
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} \
|
||||
|
@ -119,7 +126,9 @@ post-install:
|
|||
@( 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 ${STARTUP_FILE}
|
||||
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
|
||||
${FILESDIR}/snmpd.sh.sample > ${STARTUP_FILE}
|
||||
@${CHMOD} 755 ${STARTUP_FILE}
|
||||
@${ECHO_MSG}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
MD5 (net-snmp-5.0.8.tar.gz) = 9fa8555c1a9d68008b3b0df52721ee82
|
||||
MD5 (net-snmp-5.0.9.tar.gz) = cecd5ec74f5c546c1ea7ed7987b5932b
|
||||
|
|
|
@ -1,36 +1,35 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: snmpd
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: FreeBSD
|
||||
#
|
||||
# Add the following line to /etc/rc.conf to enable snmpd:
|
||||
#
|
||||
# snmpd_enable="YES"
|
||||
#
|
||||
|
||||
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
|
||||
echo "$0: Cannot determine the PREFIX" >&2
|
||||
exit 1
|
||||
snmpd_enable="NO"
|
||||
snmpd_flags="-P /var/run/snmpd.pid"
|
||||
|
||||
. %%RC_SUBR%%
|
||||
|
||||
load_rc_config net_snmpd
|
||||
|
||||
if [ ! -z "$net_snmpd_enable" ]; then
|
||||
echo "Warning: \$net_snmpd_enable is obsoleted."
|
||||
echo " Use \$snmpd_enable instead."
|
||||
snmpd_enable="$net_snmpd_enable"
|
||||
[ ! -z "$net_snmpd_flags" ] && snmpd_flags="$net_snmpd_flags"
|
||||
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
|
||||
name=snmpd
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
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'
|
||||
;;
|
||||
*)
|
||||
echo "Usage: `basename $0` {start|stop}" >&2
|
||||
;;
|
||||
esac
|
||||
command=%%PREFIX%%/sbin/snmpd
|
||||
pidfile='/var/run/snmpd.pid'
|
||||
|
||||
exit 0
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= net-snmp
|
||||
PORTVERSION= 5.0.8
|
||||
PORTREVISION= 3
|
||||
PORTVERSION= 5.0.9
|
||||
CATEGORIES= net ipv6
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= net-snmp
|
||||
|
@ -15,6 +14,13 @@ MASTER_SITE_SUBDIR= net-snmp
|
|||
MAINTAINER= kuriyama@FreeBSD.org
|
||||
COMMENT= An extendable SNMP implementation
|
||||
|
||||
.if !exists(/etc/rc.subr)
|
||||
RUN_DEPENDS= ${LOCALBASE}/etc/rc.subr:${PORTSDIR}/sysutils/rc_subr
|
||||
RC_SUBR= ${LOCALBASE}/etc/rc.subr
|
||||
.else
|
||||
RC_SUBR= /etc/rc.subr
|
||||
.endif
|
||||
|
||||
USE_PERL5= yes
|
||||
USE_REINPLACE= yes
|
||||
USE_AUTOCONF_VER=213
|
||||
|
@ -99,6 +105,7 @@ CONFIGURE_ARGS+= --enable-ipv6 \
|
|||
|
||||
SHLIB_VERSION= 5
|
||||
PLIST_SUB+= shlib=${SHLIB_VERSION}
|
||||
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} \
|
||||
|
@ -119,7 +126,9 @@ post-install:
|
|||
@( 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 ${STARTUP_FILE}
|
||||
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
|
||||
${FILESDIR}/snmpd.sh.sample > ${STARTUP_FILE}
|
||||
@${CHMOD} 755 ${STARTUP_FILE}
|
||||
@${ECHO_MSG}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
MD5 (net-snmp-5.0.8.tar.gz) = 9fa8555c1a9d68008b3b0df52721ee82
|
||||
MD5 (net-snmp-5.0.9.tar.gz) = cecd5ec74f5c546c1ea7ed7987b5932b
|
||||
|
|
|
@ -1,36 +1,35 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: snmpd
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: FreeBSD
|
||||
#
|
||||
# Add the following line to /etc/rc.conf to enable snmpd:
|
||||
#
|
||||
# snmpd_enable="YES"
|
||||
#
|
||||
|
||||
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
|
||||
echo "$0: Cannot determine the PREFIX" >&2
|
||||
exit 1
|
||||
snmpd_enable="NO"
|
||||
snmpd_flags="-P /var/run/snmpd.pid"
|
||||
|
||||
. %%RC_SUBR%%
|
||||
|
||||
load_rc_config net_snmpd
|
||||
|
||||
if [ ! -z "$net_snmpd_enable" ]; then
|
||||
echo "Warning: \$net_snmpd_enable is obsoleted."
|
||||
echo " Use \$snmpd_enable instead."
|
||||
snmpd_enable="$net_snmpd_enable"
|
||||
[ ! -z "$net_snmpd_flags" ] && snmpd_flags="$net_snmpd_flags"
|
||||
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
|
||||
name=snmpd
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
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'
|
||||
;;
|
||||
*)
|
||||
echo "Usage: `basename $0` {start|stop}" >&2
|
||||
;;
|
||||
esac
|
||||
command=%%PREFIX%%/sbin/snmpd
|
||||
pidfile='/var/run/snmpd.pid'
|
||||
|
||||
exit 0
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
|
Loading…
Reference in a new issue