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