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 (-12 / +26 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-49 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
17
23
SUB_LIST+=	PERL=${PERL}
18
RUN_DEPENDS=	net-snmp>=0:net-mgmt/net-snmp \
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
24
DOCS=		faqs.html index.html layout1.css snmptt.html \
25
DOCS=		faqs.html index.html layout1.css snmptt.html \
25
		snmpttconvert.html snmpttconvertmib.html
26
		snmpttconvert.html snmpttconvertmib.html
26
27
27
OPTIONS_DEFINE=	DOCS
28
USERS=	snmptt
29
GROUPS=	snmptt
30
31
OPTIONS_DEFINE=	DOCS EXAMPLES
32
OPTIONS_SUB=	yes
28
33
29
SCRIPTS=	snmptt snmptt-net-snmp-test snmpttconvert \
34
SCRIPTS=	snmptt snmptt-net-snmp-test snmpttconvert \
30
		snmpttconvertmib snmptthandler
35
		snmpttconvertmib snmptthandler
36
SNMPTT_DIRS=	log run spool
31
37
32
SHEBANG_FILES=	${SCRIPTS}
38
SHEBANG_FILES=	${SCRIPTS}
33
39
34
35
do-install:
40
do-install:
36
.for _SCRIPT in ${SCRIPTS}
41
.for _SCRIPT in ${SCRIPTS}
37
	@${INSTALL_SCRIPT} ${WRKSRC}/${_SCRIPT} ${STAGEDIR}${PREFIX}/sbin
42
	${INSTALL_SCRIPT} ${WRKSRC}/${_SCRIPT} ${STAGEDIR}${PREFIX}/sbin
38
.endfor
43
.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
43
46
47
do-install-EXAMPLES-on:
48
	${INSTALL_DATA} ${WRKSRC}/examples/snmptt.conf.generic \
49
		${STAGEDIR}${PREFIX}/etc/snmp/snmptt.conf.generic.sample
50
51
do-install-DOCS-on:
44
	${MKDIR} ${STAGEDIR}${DOCSDIR}
52
	${MKDIR} ${STAGEDIR}${DOCSDIR}
45
.for _DOC in ${DOCS}
53
.for _DOC in ${DOCS}
46
	${INSTALL_MAN} ${WRKSRC}/docs/${_DOC} ${STAGEDIR}${DOCSDIR}
54
	${INSTALL_MAN} ${WRKSRC}/docs/${_DOC} ${STAGEDIR}${DOCSDIR}
47
.endfor
55
.endfor
48
56
57
post-install:
58
	${INSTALL_DATA} ${FILESDIR}/snmptt.conf ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d/
59
.for _SNMPTT_DIR in ${SNMPTT_DIRS}
60
	@${MKDIR} ${STAGEDIR}/var/${_SNMPTT_DIR}/${PORTNAME}
61
.endfor
62
49
.include <bsd.port.mk>
63
.include <bsd.port.mk>
(-)net-mgmt/snmptt/files/patch-snmptt.ini (+22 lines)
Line 0 Link Here
1
--- snmptt.ini.orig	2013-11-07 01:38:52 UTC
2
+++ snmptt.ini
3
@@ -244,7 +244,7 @@ daemon_fork = 1
4
 daemon_uid = snmptt
5
 
6
 # Complete path of file to store process ID when running in daemon mode.
7
-pid_file = /var/run/snmptt.pid
8
+pid_file = /var/run/snmptt/snmptt.pid
9
 
10
 # Directory to read received traps from.  Ex: /var/spool/snmptt/
11
 # Don't forget the trailing slash!
12
@@ -619,8 +619,8 @@ DEBUGGING_FILE_HANDLER = 
13
 
14
 [TrapFiles]
15
 # A list of snmptt.conf files (this is NOT the snmptrapd.conf file).  The COMPLETE path 
16
-# and filename.  Ex: '/etc/snmp/snmptt.conf'
17
+# and filename.  Ex: '/usr/local/etc/snmp/snmptt.conf'
18
 snmptt_conf_files = <<END
19
-/etc/snmp/snmptt.conf
20
+/usr/local/etc/snmp/snmptt.conf
21
 END
22
 
(-)net-mgmt/snmptt/files/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 (-7 / +11 lines)
Lines 1-13 Link Here
1
@sample etc/snmp/snmptt.conf.generic.sample
1
etc/newsyslog.conf.d/snmptt.conf
2
%%EXAMPLES%%@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
4
sbin/snmptt-net-snmp-test
5
sbin/snmptt-net-snmp-test
5
sbin/snmpttconvert
6
sbin/snmpttconvert
6
sbin/snmpttconvertmib
7
sbin/snmpttconvertmib
7
sbin/snmptthandler
8
sbin/snmptthandler
8
%%DOCSDIR%%/faqs.html
9
%%DOCS%%%%DOCSDIR%%/faqs.html
9
%%DOCSDIR%%/index.html
10
%%DOCS%%%%DOCSDIR%%/index.html
10
%%DOCSDIR%%/layout1.css
11
%%DOCS%%%%DOCSDIR%%/layout1.css
11
%%DOCSDIR%%/snmptt.html
12
%%DOCS%%%%DOCSDIR%%/snmptt.html
12
%%DOCSDIR%%/snmpttconvert.html
13
%%DOCS%%%%DOCSDIR%%/snmpttconvert.html
13
%%DOCSDIR%%/snmpttconvertmib.html
14
%%DOCS%%%%DOCSDIR%%/snmpttconvertmib.html
15
@dir(snmptt,snmptt,775) /var/log/snmptt
16
@dir(snmptt,snmptt,775) /var/run/snmptt
17
@dir(snmptt,snmptt,700) /var/spool/snmptt

Return to bug 218509