FreeBSD Bugzilla – Attachment 181232 Details for
Bug 217108
[PATCH] net/rtg: Fix configuration paths in CGIs and reports, improve rtgtargmkr.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch that fixes PREFIX
rtg.patch (text/plain), 4.98 KB, created by
Andrew
on 2017-03-27 15:29:05 UTC
(
hide
)
Description:
Patch that fixes PREFIX
Filename:
MIME Type:
Creator:
Andrew
Created:
2017-03-27 15:29:05 UTC
Size:
4.98 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 436558) >+++ 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/ >@@ -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 > > .include <bsd.port.mk> >Index: files/patch-etc-rtgtargmkr.pl.in >=================================================================== >--- files/patch-etc-rtgtargmkr.pl.in (revision 436558) >+++ 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 217108
:
179999
|
181232
|
181234
|
181235