View | Details | Raw Unified | Return to bug 218509 | Differences between
and this patch

Collapse All | Expand All

(-)UIDs (-1 / +1 lines)
Lines 841-847 Link Here
841
# free: 892
841
# free: 892
842
# free: 893
842
# free: 893
843
# free: 894
843
# free: 894
844
# free: 895
844
snmptt:*:895:895::0:0:SNMPTT User:/var/spool/snmptt:/usr/sbin/nologin
845
istat:*:896:896::0:0:istatserver user:/nonexistent:/usr/sbin/nologin
845
istat:*:896:896::0:0:istatserver user:/nonexistent:/usr/sbin/nologin
846
znc:*:897:897::0:0:ZNC User:/nonexistent:/usr/sbin/nologin
846
znc:*:897:897::0:0:ZNC User:/nonexistent:/usr/sbin/nologin
847
ufdb:*:898:898::0:0:ufdb user:/nonexistent:/usr/sbin/nologin
847
ufdb:*:898:898::0:0:ufdb user:/nonexistent:/usr/sbin/nologin
(-)GIDs (-1 / +1 lines)
Lines 836-842 Link Here
836
# free: 892
836
# free: 892
837
# free: 893
837
# free: 893
838
# free: 894
838
# free: 894
839
# free: 895
839
snmptt:*:895:
840
istat:*:896:
840
istat:*:896:
841
znc:*:897:
841
znc:*:897:
842
ufdb:*:898:
842
ufdb:*:898:
(-)net-mgmt/snmptt/Makefile (-18 / +27 lines)
Lines 2-7 Link Here
2
2
3
PORTNAME=	snmptt
3
PORTNAME=	snmptt
4
PORTVERSION=	1.4
4
PORTVERSION=	1.4
5
PORTREVISION=	1
5
CATEGORIES=	net-mgmt
6
CATEGORIES=	net-mgmt
6
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}_${PORTVERSION}
7
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}_${PORTVERSION}
7
DISTNAME=	${PORTNAME}_${PORTVERSION}
8
DISTNAME=	${PORTNAME}_${PORTVERSION}
Lines 9-29 Link Here
9
MAINTAINER=	nistor@snickers.org
10
MAINTAINER=	nistor@snickers.org
10
COMMENT=	SNMP trap handler/translator/swiss-army-knife
11
COMMENT=	SNMP trap handler/translator/swiss-army-knife
11
12
12
NO_BUILD=	yes
13
LICENSE=	GPLv2
13
LICENSE=	GPLv2
14
LICENSE_FILE=	${WRKSRC}/COPYING
15
16
RUN_DEPENDS=	net-snmp>=0:net-mgmt/net-snmp \
17
		p5-Config-IniFiles>=0:devel/p5-Config-IniFiles
14
18
19
NO_BUILD=	yes
20
NO_ARCH=	yes
15
USES=		perl5 shebangfix tar:tgz
21
USES=		perl5 shebangfix tar:tgz
16
USE_RC_SUBR=	snmptt
22
USE_RC_SUBR=	snmptt
23
SUB_LIST=	PERL=${PERL}
17
24
18
RUN_DEPENDS=	net-snmp>=0:net-mgmt/net-snmp \
25
PORTDOCS=	faqs.html index.html layout1.css snmptt.html \
19
		p5-Config-IniFiles>=0:devel/p5-Config-IniFiles \
20
		p5-Text-Balanced>=0:textproc/p5-Text-Balanced \
21
		p5-Text-ParseWords>=0:textproc/p5-Text-ParseWords \
22
		p5-Time-HiRes>=0:devel/p5-Time-HiRes
23
24
DOCS=		faqs.html index.html layout1.css snmptt.html \
25
		snmpttconvert.html snmpttconvertmib.html
26
		snmpttconvert.html snmpttconvertmib.html
26
27
28
USERS=	snmptt
29
GROUPS=	snmptt
30
27
OPTIONS_DEFINE=	DOCS
31
OPTIONS_DEFINE=	DOCS
28
32
29
SCRIPTS=	snmptt snmptt-net-snmp-test snmpttconvert \
33
SCRIPTS=	snmptt snmptt-net-snmp-test snmpttconvert \
Lines 31-49 Link Here
31
35
32
SHEBANG_FILES=	${SCRIPTS}
36
SHEBANG_FILES=	${SCRIPTS}
33
37
38
post-patch:
39
	${REINPLACE_CMD} -e "s|/var/run|/var/run/${PORTNAME}|" \
40
	-e "s|/etc|${PREFIX}/etc|" ${WRKSRC}/snmptt.ini
34
41
35
do-install:
42
do-install:
36
.for _SCRIPT in ${SCRIPTS}
43
	cd ${WRKSRC} && ${INSTALL_SCRIPT} ${SCRIPTS} ${STAGEDIR}${PREFIX}/sbin
37
	@${INSTALL_SCRIPT} ${WRKSRC}/${_SCRIPT} ${STAGEDIR}${PREFIX}/sbin
38
.endfor
39
40
	${MKDIR} ${STAGEDIR}${PREFIX}/etc/snmp
44
	${MKDIR} ${STAGEDIR}${PREFIX}/etc/snmp
41
	${INSTALL_DATA} ${WRKSRC}/snmptt.ini ${STAGEDIR}${PREFIX}/etc/snmp/snmptt.ini.sample
45
	${INSTALL_DATA} ${WRKSRC}/snmptt.ini ${STAGEDIR}${PREFIX}/etc/snmp/snmptt.ini.sample
42
	${INSTALL_DATA} ${WRKSRC}/examples/snmptt.conf.generic ${STAGEDIR}${PREFIX}/etc/snmp/snmptt.conf.generic.sample
46
	${INSTALL_DATA} ${WRKSRC}/examples/snmptt.conf.generic \
43
47
		${STAGEDIR}${PREFIX}/etc/snmp/snmptt.conf.generic.sample
44
	${MKDIR} ${STAGEDIR}${DOCSDIR}
48
	${INSTALL_DATA} ${FILESDIR}/newsyslog-snmptt.conf \
45
.for _DOC in ${DOCS}
49
		${STAGEDIR}${PREFIX}/etc/snmp/newsyslog-snmptt.conf.sample
46
	${INSTALL_MAN} ${WRKSRC}/docs/${_DOC} ${STAGEDIR}${DOCSDIR}
50
	@${MKDIR} ${STAGEDIR}/var/log/${PORTNAME}
47
.endfor
51
	@${MKDIR} ${STAGEDIR}/var/run/${PORTNAME}
52
	@${MKDIR} ${STAGEDIR}/var/spool/${PORTNAME}
53
54
do-install-DOCS-on:
55
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
56
	cd ${WRKSRC}/docs && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
48
57
49
.include <bsd.port.mk>
58
.include <bsd.port.mk>
(-)net-mgmt/snmptt/files/newsyslog-snmptt.conf (+10 lines)
Line 0 Link Here
1
# configuration file for newsyslog for snmptt
2
#
3
# see newsyslog.conf(5) for details
4
#
5
# logfilename          [owner:group]    mode count size when  flags [/pid_file] [sig_num]
6
/var/log/snmptt/snmptt.debug	snmptt:snmptt	644	3	1024	*	JC	/var/run/snmptt/snmptt.pid
7
/var/log/snmptt/snmptt.log	snmptt:snmptt	644	3	*	$W6D0	JC
8
/var/log/snmptt/snmptthandler.debug	snmptt:snmptt	644	3	1024	*	JC
9
/var/log/snmptt/snmpttunknown.log	snmptt:snmptt	644	3	1024	*	JC
10
/var/log/snmptt/snmpttsystem.log	snmptt:snmptt	644	3	1024	*	JC
(-)net-mgmt/snmptt/files/snmptt.in (-21 / +12 lines)
Lines 9-44 Link Here
9
#
9
#
10
# Add the following lines to /etc/rc.conf to enable snmptt:
10
# Add the following lines to /etc/rc.conf to enable snmptt:
11
#
11
#
12
# snmptt_enable="YES"
12
# snmptt_enable:    Set to NO by default. Set it to YES to enable it.
13
# snmptt_flags="<set as needed>"
13
# snmptt_user:      The user account snmptt runs as what
14
#
14
#                   you want it to be. It uses 'snmptt' user by
15
# See snmptt documentation for flags.
15
#                   default.
16
# snmptt_flags:     See snmptt documentation for flags.
16
#
17
#
17
18
18
. /etc/rc.subr
19
. /etc/rc.subr
19
20
20
name=snmptt
21
name=snmptt
21
rcvar=snmptt_enable
22
rcvar=${name}_enable
22
23
23
command=%%PREFIX%%/sbin/${name}
24
command=%%PREFIX%%/sbin/${name}
24
command_args=">/dev/null --daemon"
25
command_args="--daemon > /dev/null 2>&1"
25
pidfile=/var/run/${name}.pid
26
command_interpreter=%%PERL%%
26
# XXX: Makes assumptions about the interpreter path and version. However,
27
# USE_PERL5 should guarantee that this path is valid. In any event, we
28
# don't sed-ify the #! operators.
29
procname=/usr/bin/perl
30
required_files=%%PREFIX%%/etc/snmp/${name}.ini
31
32
# set defaults
33
27
34
snmptt_enable=${snmptt_enable:-"NO"}
28
load_rc_config ${name}
35
29
36
stop_postcmd=stop_postcmd
30
: ${snmptt_enable:="NO"}
31
: ${snmptt_user:="snmptt"}
37
32
38
stop_postcmd()
33
required_files=%%PREFIX%%/etc/snmp/${name}.ini
39
{
40
  rm -f $pidfile
41
}
42
34
43
load_rc_config ${name}
44
run_rc_command "$1"
35
run_rc_command "$1"
(-)net-mgmt/snmptt/pkg-plist (-6 / +5 lines)
Lines 1-3 Link Here
1
@sample etc/snmp/newsyslog-snmptt.conf.sample etc/newsyslog.conf.d/snmptt.conf
1
@sample etc/snmp/snmptt.conf.generic.sample
2
@sample etc/snmp/snmptt.conf.generic.sample
2
@sample etc/snmp/snmptt.ini.sample
3
@sample etc/snmp/snmptt.ini.sample
3
sbin/snmptt
4
sbin/snmptt
Lines 5-13 Link Here
5
sbin/snmpttconvert
6
sbin/snmpttconvert
6
sbin/snmpttconvertmib
7
sbin/snmpttconvertmib
7
sbin/snmptthandler
8
sbin/snmptthandler
8
%%DOCSDIR%%/faqs.html
9
%%PORTDOCS%%@dir %%DOCSDIR%%
9
%%DOCSDIR%%/index.html
10
@dir(snmptt,snmptt,775) /var/log/snmptt
10
%%DOCSDIR%%/layout1.css
11
@dir(snmptt,snmptt,775) /var/run/snmptt
11
%%DOCSDIR%%/snmptt.html
12
@dir(snmptt,snmptt,700) /var/spool/snmptt
12
%%DOCSDIR%%/snmpttconvert.html
13
%%DOCSDIR%%/snmpttconvertmib.html

Return to bug 218509