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

Collapse All | Expand All

(-)Makefile (-2 / +5 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	rtg
4
PORTNAME=	rtg
5
PORTVERSION=	0.7.4
5
PORTVERSION=	0.7.4
6
PORTREVISION=	13
6
PORTREVISION=	14
7
CATEGORIES=	net
7
CATEGORIES=	net
8
MASTER_SITES=	SF \
8
MASTER_SITES=	SF \
9
		ftp://ftpmirror.uk/freebsd-ports/rtg/
9
		ftp://ftpmirror.uk/freebsd-ports/rtg/
Lines 19-25 Link Here
19
19
20
USE_RC_SUBR=	rtgpoll
20
USE_RC_SUBR=	rtgpoll
21
WANT_PERL=	yes
21
WANT_PERL=	yes
22
USES=		shebangfix mysql:client
22
USES=		shebangfix mysql:client ssl
23
SHEBANG_FILES=	etc/95.pl etc/report.pl etc/rtgtargmkr.pl.in
23
SHEBANG_FILES=	etc/95.pl etc/report.pl etc/rtgtargmkr.pl.in
24
SUB_FILES=	pkg-message
24
SUB_FILES=	pkg-message
25
GNU_CONFIGURE=	yes
25
GNU_CONFIGURE=	yes
Lines 46-50 Link Here
46
post-patch:
46
post-patch:
47
	@${MV} ${WRKSRC}/etc/rtg.conf ${WRKSRC}/etc/rtg.conf.sample
47
	@${MV} ${WRKSRC}/etc/rtg.conf ${WRKSRC}/etc/rtg.conf.sample
48
	@${MV} ${WRKSRC}/etc/routers ${WRKSRC}/etc/routers.sample
48
	@${MV} ${WRKSRC}/etc/routers ${WRKSRC}/etc/routers.sample
49
	@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/etc/95.pl
50
	@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/etc/report.pl
51
	@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/etc/common.php.in
49
52
50
.include <bsd.port.mk>
53
.include <bsd.port.mk>
(-)files/patch-etc-rtgtargmkr.pl.in (-1 / +19 lines)
Lines 1-4 Link Here
1
--- etc/rtgtargmkr.pl.in.orig	2016-10-25 16:28:59 UTC
1
--- etc/rtgtargmkr.pl.in.orig	2016-11-04 16:36:53 UTC
2
+++ etc/rtgtargmkr.pl.in
2
+++ etc/rtgtargmkr.pl.in
3
@@ -126,7 +126,7 @@ sub find_router_id {
3
@@ -126,7 +126,7 @@ sub find_router_id {
4
         &sql_insert($sql);
4
         &sql_insert($sql);
Lines 9-11 Link Here
9
           &sql_insert($sql);
9
           &sql_insert($sql);
10
         }
10
         }
11
     }
11
     }
12
@@ -289,7 +289,7 @@ sub main {
13
       $year + 1900, $hour, $min;
14
     print CFG "# Host\tOID\tBits\tCommunity\tTable\tID\tDescription\n";
15
 
16
-    foreach $router (@routers) {
17
+    POKE: foreach $router (@routers) {
18
         $bits = $counterBits{$router};
19
         # Sanity check bits
20
         $bits = $defbits if ( ( $bits != 32 ) && ( $bits != 64 ) );
21
@@ -304,7 +304,7 @@ sub main {
22
         $system = join ( ' ', @result );
23
         print "System: $system\n" if $DEBUG;
24
         $session = SNMP_Session->open( $router, $communities{$router}, 161 )
25
-          || die "Error opening SNMP session to $router";
26
+          || ( print "Error opening SNMP session to $router" and next POKE );
27
         if ( $system =~ /.*Cisco.*WS-.*/ ) {
28
             $system = "Catalyst";
29
             $session->map_table( $catalyst, \&process );
(-)files/patch-etc_95.pl (+11 lines)
Line 0 Link Here
1
--- etc/95.pl.orig	2016-11-04 16:36:01 UTC
2
+++ etc/95.pl
3
@@ -31,7 +31,7 @@ $pass="rtgdefault";
4
 $onedaysec=60*60*24;
5
 
6
 # Default locations to find RTG configuration file
7
-@configs = ("rtg.conf", "/usr/local/rtg/etc/rtg.conf", "/etc/rtg.conf");
8
+@configs = ("rtg.conf", "%%PREFIX%%/etc/rtg/rtg.conf", "/usr/local/rtg/etc/rtg.conf", "/etc/rtg.conf");
9
 foreach $conf (@configs) {
10
   if (open CONF, "<$conf") {
11
     print "Reading [$conf].\n" if $DEBUG;
(-)files/patch-etc_common.php.in (+16 lines)
Line 0 Link Here
1
--- etc/common.php.in.orig	2003-09-26 15:52:29 UTC
2
+++ etc/common.php.in
3
@@ -6,10 +6,13 @@
4
  $pass="rtgdefault";
5
  $db="rtg";
6
  $refresh=300;
7
+
8
+ date_default_timezone_set ( 'UTC' );
9
  
10
  /* Default locations to find RTG configuration file */
11
  $configs[] = 'rtg.conf';
12
  $configs[] = '@RTG_HOME@/etc/rtg.conf';
13
+ $configs[] = '%%PREFIX%%/etc/rtg/rtg.conf';
14
  $configs[] = '/usr/local/rtg/etc/rtg.conf';
15
  $configs[] = '/etc/rtg.conf';
16
 
(-)files/patch-etc_report.pl (+11 lines)
Line 0 Link Here
1
--- etc/report.pl.orig	2016-11-04 16:36:08 UTC
2
+++ etc/report.pl
3
@@ -30,7 +30,7 @@ $pass="rtgdefault";
4
 $onedaysec=60*60*24;
5
 
6
 # Default locations to find RTG configuration file
7
-@configs = ("rtg.conf", "/usr/local/rtg/etc/rtg.conf", "/etc/rtg.conf");
8
+@configs = ("rtg.conf", "%%PREFIX%%/etc/rtg/rtg.conf", "/usr/local/rtg/etc/rtg.conf", "/etc/rtg.conf");
9
 foreach $conf (@configs) {
10
   if (open CONF, "<$conf") {
11
     print "Reading [$conf].\n" if $DEBUG;

Return to bug 217108