diff options
author | lth <lth@FreeBSD.org> | 2006-10-31 23:18:15 +0800 |
---|---|---|
committer | lth <lth@FreeBSD.org> | 2006-10-31 23:18:15 +0800 |
commit | aef00ba137a19ec639d371ddfbbf06aa8d2fce62 (patch) | |
tree | 46eb9d9c3de304cb41a3e66fef45972b4da65178 /net-mgmt | |
parent | 756efc3c831fea720a346ddc7d2d694d459d9524 (diff) | |
download | freebsd-ports-gnome-aef00ba137a19ec639d371ddfbbf06aa8d2fce62.tar.gz freebsd-ports-gnome-aef00ba137a19ec639d371ddfbbf06aa8d2fce62.tar.zst freebsd-ports-gnome-aef00ba137a19ec639d371ddfbbf06aa8d2fce62.zip |
- Install rgb.txt, incl dependencies [1]
- Update to rrdtool 1.2 syntax [1], fixes [2]
- Substitute absolute paths
PR: ports/98369 [1], ports/103724 [2]
Submitted by: vax@satx.rr.com [1], Rodrigo Graeff <delphus@gmail.com> [2]
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/ifgraph/Makefile | 16 | ||||
-rw-r--r-- | net-mgmt/ifgraph/files/patch-find-if.pl | 14 | ||||
-rw-r--r-- | net-mgmt/ifgraph/files/patch-ifgraph.pl | 32 | ||||
-rw-r--r-- | net-mgmt/ifgraph/files/patch-makegraph.pl | 58 | ||||
-rw-r--r-- | net-mgmt/ifgraph/pkg-plist | 2 |
5 files changed, 111 insertions, 11 deletions
diff --git a/net-mgmt/ifgraph/Makefile b/net-mgmt/ifgraph/Makefile index eeaf81c65df7..1012ee62386e 100644 --- a/net-mgmt/ifgraph/Makefile +++ b/net-mgmt/ifgraph/Makefile @@ -7,6 +7,7 @@ PORTNAME= ifgraph PORTVERSION= 0.4.10 +PORTREVISION= 1 CATEGORIES= net-mgmt www MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -14,7 +15,9 @@ MASTER_SITE_SUBDIR= ${PORTNAME} MAINTAINER= lth@FreeBSD.org COMMENT= Simple grapher of SNMP data with RRD -RUN_DEPENDS= rrdtool:${PORTSDIR}/net/rrdtool +RUN_DEPENDS= rrdtool:${PORTSDIR}/net/rrdtool \ + p5-Color-Rgb>0:${PORTSDIR}/graphics/p5-Color-Rgb +BUILD_DEPENDS= ${RUN_DEPENDS} USE_PERL5= yes NO_BUILD= yes @@ -30,7 +33,8 @@ PLFILES= find-if.pl ifgraph.pl makegraph.pl DOCFILES= CHANGELOG INSTALACAO INSTALL TODO LICENSE.TXT MUDANCAS FILES_SUB= USER=${IFGRAPH_USER} GROUP=${IFGRAPH_GROUP} \ - PREFIX=${PREFIX} DOCSDIR=${DOCSDIR} + PREFIX=${PREFIX} DOCSDIR=${DOCSDIR} \ + PERL=${PERL} LOCALBASE=${LOCALBASE} pre-install: @ ${SED} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ @@ -43,13 +47,17 @@ do-install: @ ${SED} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ ${PKGDIR}/pkg-message > ${PKGMESSAGE} .for plfile in ${PLFILES} - @ ${INSTALL_SCRIPT} ${WRKSRC}/${plfile} ${PREFIX}/bin + @ ${SED} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + ${WRKSRC}/${plfile} > ${WRKDIR}/${plfile} + @ ${INSTALL_SCRIPT} ${WRKDIR}/${plfile} ${PREFIX}/bin .endfor @ ${SED} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ ${WRKSRC}/ifgraph.conf > ${WRKSRC}/ifgraph.conf.sample @ ${INSTALL_DATA} ${WRKSRC}/ifgraph.conf.sample ${PREFIX}/etc @ ${MKDIR} ${PREFIX}/ifgraph @ ${MKDIR} ${PREFIX}/ifgraph/htdocs + @ ${MKDIR} ${PREFIX}/ifgraph/lib + @ ${CP} ${WRKSRC}/lib/rgb.txt ${PREFIX}/ifgraph/lib @ ${CP} -Rp ${WRKSRC}/templates ${PREFIX}/ifgraph @ ${SED} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ ${FILESDIR}/crontab.in > ${PREFIX}/ifgraph/crontab.in @@ -72,8 +80,10 @@ post-install: .include <bsd.port.pre.mk> .if ${PERL_LEVEL} < 500600 +BUILD_DEPENDS+= ${SITE_PERL}/Net/SNMP.pm:${PORTSDIR}/net-mgmt/p5-Net-SNMP3 RUN_DEPENDS+= ${SITE_PERL}/Net/SNMP.pm:${PORTSDIR}/net-mgmt/p5-Net-SNMP3 .else +BUILD_DEPENDS+= ${SITE_PERL}/Net/SNMP.pm:${PORTSDIR}/net-mgmt/p5-Net-SNMP RUN_DEPENDS+= ${SITE_PERL}/Net/SNMP.pm:${PORTSDIR}/net-mgmt/p5-Net-SNMP .endif diff --git a/net-mgmt/ifgraph/files/patch-find-if.pl b/net-mgmt/ifgraph/files/patch-find-if.pl index c547871067eb..e7756643cb25 100644 --- a/net-mgmt/ifgraph/files/patch-find-if.pl +++ b/net-mgmt/ifgraph/files/patch-find-if.pl @@ -1,8 +1,14 @@ ---- find-if.pl.orig Sat Sep 20 14:35:38 2003 -+++ find-if.pl Sat Sep 20 14:36:07 2003 +--- ./find-if.pl.orig Sat Jan 3 23:44:21 2004 ++++ ./find-if.pl Mon Oct 9 13:49:17 2006 +@@ -1,4 +1,4 @@ +-#!/usr/bin/perl -w ++#!%%PERL%% -w + #ifGraph 0.4.10 - Network Interface Data to RRD + #Copyright (C) 2001-200333 Ricardo Sartori + # @@ -19,10 +19,6 @@ - #Sugestoes e criticas (sem flames!!) mailto:sartori@ifgraph.org - #Visite: http://www.ifgraph.org + #Sugestoes e criticas (sem flames!!) mailto:sartori@lrv.ufsc.br + #Visite: http://ifgraph.lrv.ufsc.br -# Let's find out where we are -use FindBin; diff --git a/net-mgmt/ifgraph/files/patch-ifgraph.pl b/net-mgmt/ifgraph/files/patch-ifgraph.pl index e46fe4f49054..a933c610989d 100644 --- a/net-mgmt/ifgraph/files/patch-ifgraph.pl +++ b/net-mgmt/ifgraph/files/patch-ifgraph.pl @@ -1,5 +1,11 @@ ---- ifgraph.pl.orig Sat Jan 3 16:44:21 2004 -+++ ifgraph.pl Tue Feb 7 12:34:09 2006 +--- ./ifgraph.pl.orig Sat Jan 3 23:44:21 2004 ++++ ./ifgraph.pl Mon Oct 9 13:49:17 2006 +@@ -1,4 +1,4 @@ +-#!/usr/bin/perl -w ++#!%%PERL%% -w + #ifGraph 0.4.10 - Network Interface Data to RRD + #Copyright (C) 2001-2003 Ricardo Sartori + # @@ -19,10 +19,6 @@ #Sugestoes e criticas (sem flames!!) mailto:sartori@ifgraph.lrv.ufsc.br #Visite: http://ifgraph.lrv.ufsc.br @@ -27,3 +33,25 @@ # SIGINT call $SIG{INT}=\&sigint; +@@ -54,9 +43,9 @@ + if (defined($opt_c)) { + $configfile=$opt_c; + } else { +- print("Warning: searching /usr/local/etc/, /etc and ./ for an ifgraph.conf file\n"); +- if (-r "/usr/local/etc/ifgraph.conf") { +- $configfile="/usr/local/etc/ifgraph.conf"; ++ print("Warning: searching %%PREFIX%%/etc/, /etc and ./ for an ifgraph.conf file\n"); ++ if (-r "%%PREFIX%%/etc/ifgraph.conf") { ++ $configfile="%%PREFIX%%/etc/ifgraph.conf"; + } elsif (-r "/etc/ifgraph.conf") { # used from the patch of Iain Lea <iain@bricbrac.de> + $configfile="/etc/ifgraph.conf"; + } elsif (-r "./ifgraph.conf") { +@@ -804,7 +793,7 @@ + # Setting targets defaults + my(@default)=("name","1G","localhost","public",161,0,1,0,10,600,300,"RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797",0,"GAUGE"); + # Setting global defaults +- @global[1,2,4]=("/usr/local/bin/rrdtool","/usr/local/rrdfiles/",1); ++ @global[1,2,4]=("%%LOCALBASE%%/bin/rrdtool","%%LOCALBASE%%/rrdfiles/",1); + my($accept_new_target)=1; + my($index)=-1; # $index replaces $global[0] during the parsing + open(CONF,"$configfile") || die("readconf() Fatal: Could not read config file $configfile ($!)\n"); diff --git a/net-mgmt/ifgraph/files/patch-makegraph.pl b/net-mgmt/ifgraph/files/patch-makegraph.pl index a7297a1a8c5a..bafadce6bc3f 100644 --- a/net-mgmt/ifgraph/files/patch-makegraph.pl +++ b/net-mgmt/ifgraph/files/patch-makegraph.pl @@ -1,5 +1,11 @@ ---- makegraph.pl.orig Sat Jan 3 16:44:21 2004 -+++ makegraph.pl Tue Feb 7 12:48:07 2006 +--- ./makegraph.pl.orig Sat Jan 3 23:44:21 2004 ++++ ./makegraph.pl Mon Oct 9 13:49:55 2006 +@@ -1,4 +1,4 @@ +-#!/usr/bin/perl -w ++#!%%PERL%% -w + #ifGraph 0.4.10 - Network Interface Data to RRD + #Copyright (C) 2001-2003 Ricardo Sartori + # @@ -19,8 +19,6 @@ #Sugestoes e criticas (sem flames!!) mailto:sartori@ifgraph.lrv.ufsc.br #Visite: http://ifgraph.lrv.ufsc.br @@ -25,3 +31,51 @@ # HELP if (defined($opt_h)) { +@@ -48,16 +39,16 @@ + + # Creating a color converter object + &debug("main(): Creating a RGB converter object from Color::Rgb\n"); +-$rgb_converter = new Color::Rgb(rgb_txt=>"$FindBin::Bin/lib/rgb.txt"); ++$rgb_converter = new Color::Rgb(rgb_txt=>"%%PREFIX%%/ifgraph/lib/rgb.txt"); + if ($rgb_converter) { &debug("main(): Ok RGB converter object created\n"); } + + # Defining the $configile variable + if (defined($opt_c)) { + $configfile=$opt_c; + } else { +- print("Warning: searching /usr/local/etc/, /etc and ./ for an ifgraph.conf file\n"); +- if (-r "/usr/local/etc/ifgraph.conf") { +- $configfile="/usr/local/etc/ifgraph.conf"; ++ print("Warning: searching %%PREFIX%%/etc/, /etc and ./ for an ifgraph.conf file\n"); ++ if (-r "%%PREFIX%%/etc/ifgraph.conf") { ++ $configfile="%%PREFIX%%/etc/ifgraph.conf"; + } elsif (-r "/etc/ifgraph.conf") { # used from the patch of Iain Lea <iain@bricbrac.de> + $configfile="/etc/ifgraph.conf"; + } elsif (-r "./ifgraph.conf") { +@@ -683,7 +674,7 @@ + &debug("criaGraficoBytes(): Colors are $color_back, $color_canvas, $color_shadea, $color_shadeb, $color_grid, $color_mgrid, $color_font, $color_frame, $color_arrow, $color_in, $color_out\ncriaGraficoBytes(): Options are $$targets[$targetindex][6]->[0] $$targets[$targetindex][6]->[1] $$targets[$targetindex][6]->[2] $$targets[$targetindex][6]->[3] $$targets[$targetindex][6]->[4] $$targets[$targetindex][6]->[5]\ncriaGraficoBytes(): Dimensions are $$targets[$targetindex][7]->[0] x $$targets[$targetindex][7]->[1]\n"); + my($start); + while ($start=shift(@period)) { +- print(RRDTOOL "graph $global->[3]/$targets->[$targetindex][0]$start.$opt_imgformat -a $$global[5] -b 1000 $opt_rigid -s $start -e -$targets->[$targetindex][19] $opt_legend $opt_nominor -w $dim_width -h $dim_height -c BACK$color_back -c CANVAS$color_canvas -c SHADEA$color_shadea -c SHADEB$color_shadeb -c GRID$color_grid -c MGRID$color_mgrid -c FONT$color_font -c FRAME$color_frame -c ARROW$color_arrow -v \" $$targets[$targetindex][9] \" -t \"$$targets[$targetindex][10]\" $opt_inout_def CDEF:deltain=totalin,errin,-,0,LT,0,totalin,errin,-,IF CDEF:in=deltain,0,LT,0,deltain,IF,$bwidth_in,GT,$bwidth_in,deltain,IF CDEF:deltaout=totalout,errout,-,0,LT,0,totalout,errout,-,IF CDEF:out=deltaout,0,LT,0,deltaout,IF,$bwidth_out,GT,$bwidth_out,deltaout,IF CDEF:kbin=in,1000,\/ CDEF:kbout=out,1000,\/ CDEF:percbin=in,100,*,$bwidth_in,\/ CDEF:percbout=out,100,*,$bwidth_out,\/ AREA:in$color_in:\"$$targets[$targetindex][11]->[0]\" LINE2:out$color_out:\"$$targets[$targetindex][11]->[1]\\l\" GPRINT:kbin:LAST:\'$$targets[$targetindex][11]->[0] - Now\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:LAST:\' (%.1lf%%)\' GPRINT:kbin:AVERAGE:\'Avg\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:AVERAGE:\' (%.1lf%%)\' GPRINT:kbin:MAX:\'Max\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:MAX:\' (%.1lf%%)\\l\' GPRINT:kbout:LAST:\'$$targets[$targetindex][11]->[1] - Now\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:LAST:\' (%.1lf%%)\' GPRINT:kbout:AVERAGE:\'Avg\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:AVERAGE:\' (%.1lf%%)\' GPRINT:kbout:MAX:\'Max\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:MAX:\' (%.1lf%%)\\l\' COMMENT:\'Max bytes for target $targets->[$targetindex][0]\: $bwidth_in - $bwidth_out bytes/sec\\l\' $opt_error\n")|| die("criaGraficoBytes() Fatal: Could not print to filehandle RRDTOOL: $!\n"); ++ print(RRDTOOL "graph $global->[3]/$targets->[$targetindex][0]$start.$opt_imgformat -a $$global[5] -b 1000 $opt_rigid -s $start -e -$targets->[$targetindex][19] $opt_legend $opt_nominor -w $dim_width -h $dim_height -c BACK$color_back -c CANVAS$color_canvas -c SHADEA$color_shadea -c SHADEB$color_shadeb -c GRID$color_grid -c MGRID$color_mgrid -c FONT$color_font -c FRAME$color_frame -c ARROW$color_arrow -v \" $$targets[$targetindex][9] \" -t \"$$targets[$targetindex][10]\" $opt_inout_def CDEF:deltain=totalin,errin,-,0,LT,0,totalin,errin,-,IF CDEF:in=deltain,0,LT,0,deltain,IF,$bwidth_in,GT,$bwidth_in,deltain,IF CDEF:deltaout=totalout,errout,-,0,LT,0,totalout,errout,-,IF CDEF:out=deltaout,0,LT,0,deltaout,IF,$bwidth_out,GT,$bwidth_out,deltaout,IF CDEF:kbin=in,1000,\/ CDEF:kbout=out,1000,\/ CDEF:percbin=in,100,*,$bwidth_in,\/ CDEF:percbout=out,100,*,$bwidth_out,\/ AREA:in$color_in:\"$$targets[$targetindex][11]->[0]\" LINE2:out$color_out:\"$$targets[$targetindex][11]->[1]\\l\" GPRINT:kbin:LAST:\'$$targets[$targetindex][11]->[0] - Now\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:LAST:\' (%.1lf%%)\' GPRINT:kbin:AVERAGE:\'Avg\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:AVERAGE:\' (%.1lf%%)\' GPRINT:kbin:MAX:\'Max\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:MAX:\' (%.1lf%%)\\l\' GPRINT:kbout:LAST:\'$$targets[$targetindex][11]->[1] - Now\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:LAST:\' (%.1lf%%)\' GPRINT:kbout:AVERAGE:\'Avg\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:AVERAGE:\' (%.1lf%%)\' GPRINT:kbout:MAX:\'Max\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:MAX:\' (%.1lf%%)\\l\' COMMENT:\'Max bytes for target $targets->[$targetindex][0]\\: $bwidth_in - $bwidth_out bytes/sec\\l\' $opt_error\n")|| die("criaGraficoBytes() Fatal: Could not print to filehandle RRDTOOL: $!\n"); + } + } + +@@ -737,7 +728,7 @@ + &debug("criaGraficoBits(): Colors are $color_back, $color_canvas, $color_shadea, $color_shadeb, $color_grid, $color_mgrid, $color_font, $color_frame, $color_arrow, $color_in, $color_out\ncriaGraficoBits(): Options are $$targets[$targetindex][6]->[0] $$targets[$targetindex][6]->[1] $$targets[$targetindex][6]->[2] $$targets[$targetindex][6]->[3] $$targets[$targetindex][6]->[4] $$targets[$targetindex][6]->[5]\ncriaGraficoBits(): Dimensions are $$targets[$targetindex][7]->[0] x $$targets[$targetindex][7]->[1]\n"); + my($start); + while ($start=shift(@period)) { +- print(RRDTOOL "graph $global->[3]/$targets->[$targetindex][0]$start.$opt_imgformat -a $$global[5] -b 1000 $opt_rigid -s $start -e -$targets->[$targetindex][19] $opt_legend $opt_nominor -w $dim_width -h $dim_height -c BACK$color_back -c CANVAS$color_canvas -c SHADEA$color_shadea -c SHADEB$color_shadeb -c GRID$color_grid -c MGRID$color_mgrid -c FONT$color_font -c FRAME$color_frame -c ARROW$color_arrow -v \"$$targets[$targetindex][9]\" -t \"$$targets[$targetindex][10]\" $opt_inout_def CDEF:deltain=totalin,errin,-,0,LT,0,totalin,errin,-,IF CDEF:in=deltain,0,LT,0,deltain,IF,$bytes_bwidth_in,GT,$bytes_bwidth_in,deltain,IF CDEF:deltaout=totalout,errout,-,0,LT,0,totalout,errout,-,IF CDEF:out=deltaout,0,LT,0,deltaout,IF,$bytes_bwidth_out,GT,$bytes_bwidth_out,deltaout,IF CDEF:bitsin=in,8,* CDEF:bitsout=out,8,* CDEF:kbitsin=bitsin,1000,\/ CDEF:kbitsout=bitsout,1000,\/ CDEF:percbin=bitsin,100,*,$bwidth_in,\/ CDEF:percbout=bitsout,100,*,$bwidth_out,\/ CDEF:berrin=errin,8,\/ CDEF:berrout=errout,8,\/ AREA:bitsin$color_in:\"$$targets[$targetindex][11]->[0]\" LINE2:bitsout$color_out:\"$$targets[$targetindex][11]->[1]\\l\" GPRINT:kbitsin:LAST:\'$$targets[$targetindex][11]->[0] - Now\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:LAST:\' (%.1lf%%)\' GPRINT:kbitsin:AVERAGE:\'Avg\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:AVERAGE:\' (%.1lf%%)\' GPRINT:kbitsin:MAX:\'Max\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:MAX:\' (%.1lf%%)\\l\' GPRINT:kbitsout:LAST:\'$$targets[$targetindex][11]->[1] - Now\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:LAST:\' (%.1lf%%)\' GPRINT:kbitsout:AVERAGE:\'Avg\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:AVERAGE:\' (%.1lf%%)\' GPRINT:kbitsout:MAX:\'Max\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:MAX:\' (%.1lf%%)\\l\' COMMENT:\'Max bits for target $targets->[$targetindex][0]\: $bwidth_in - $bwidth_out bits/sec \\l\' $opt_error\n") || die("criaGraficoBits() Fatal: Could not print to filehandle RRDTOOL: $!\n"); ++ print(RRDTOOL "graph $global->[3]/$targets->[$targetindex][0]$start.$opt_imgformat -a $$global[5] -b 1000 $opt_rigid -s $start -e -$targets->[$targetindex][19] $opt_legend $opt_nominor -w $dim_width -h $dim_height -c BACK$color_back -c CANVAS$color_canvas -c SHADEA$color_shadea -c SHADEB$color_shadeb -c GRID$color_grid -c MGRID$color_mgrid -c FONT$color_font -c FRAME$color_frame -c ARROW$color_arrow -v \"$$targets[$targetindex][9]\" -t \"$$targets[$targetindex][10]\" $opt_inout_def CDEF:deltain=totalin,errin,-,0,LT,0,totalin,errin,-,IF CDEF:in=deltain,0,LT,0,deltain,IF,$bytes_bwidth_in,GT,$bytes_bwidth_in,deltain,IF CDEF:deltaout=totalout,errout,-,0,LT,0,totalout,errout,-,IF CDEF:out=deltaout,0,LT,0,deltaout,IF,$bytes_bwidth_out,GT,$bytes_bwidth_out,deltaout,IF CDEF:bitsin=in,8,* CDEF:bitsout=out,8,* CDEF:kbitsin=bitsin,1000,\/ CDEF:kbitsout=bitsout,1000,\/ CDEF:percbin=bitsin,100,*,$bwidth_in,\/ CDEF:percbout=bitsout,100,*,$bwidth_out,\/ CDEF:berrin=errin,8,\/ CDEF:berrout=errout,8,\/ AREA:bitsin$color_in:\"$$targets[$targetindex][11]->[0]\" LINE2:bitsout$color_out:\"$$targets[$targetindex][11]->[1]\\l\" GPRINT:kbitsin:LAST:\'$$targets[$targetindex][11]->[0] - Now\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:LAST:\' (%.1lf%%)\' GPRINT:kbitsin:AVERAGE:\'Avg\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:AVERAGE:\' (%.1lf%%)\' GPRINT:kbitsin:MAX:\'Max\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:MAX:\' (%.1lf%%)\\l\' GPRINT:kbitsout:LAST:\'$$targets[$targetindex][11]->[1] - Now\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:LAST:\' (%.1lf%%)\' GPRINT:kbitsout:AVERAGE:\'Avg\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:AVERAGE:\' (%.1lf%%)\' GPRINT:kbitsout:MAX:\'Max\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:MAX:\' (%.1lf%%)\\l\' COMMENT:\'Max bits for target $targets->[$targetindex][0]\\: $bwidth_in - $bwidth_out bits/sec \\l\' $opt_error\n") || die("criaGraficoBits() Fatal: Could not print to filehandle RRDTOOL: $!\n"); + } + } + +@@ -832,7 +823,7 @@ + # Setting targets defaults + my(@default)=("name","1G","localhost","public",161,0,"","460x150","back#FFFFFF","","","","1000","",1,10,"-1day,-1week,-1month,-1year",0,"",600,2); + # Setting global defaults +- @global[1,2,3,4,5]=("/usr/local/bin/rrdtool","/usr/local/rrdfiles/","/usr/local/htdocs/","$FindBin::Bin/templates/en/","PNG"); ++ @global[1,2,3,4,5]=("%%LOCALBASE%%/bin/rrdtool","%%LOCALBASE%%/rrdfiles/","%%PERFIX%%/htdocs/","%%PREFIX%%/ifgraph/templates/en/","PNG"); + my($accept_new_target)=1; + my($index)=-1; # target targetindex + open(CONF,"$configfile") || die("readconf() Fatal: Could not read configuration file $configfile ($!)\n"); diff --git a/net-mgmt/ifgraph/pkg-plist b/net-mgmt/ifgraph/pkg-plist index d63d49d7fab0..26c1f5c8141f 100644 --- a/net-mgmt/ifgraph/pkg-plist +++ b/net-mgmt/ifgraph/pkg-plist @@ -6,6 +6,7 @@ bin/ifgraph.pl bin/makegraph.pl etc/ifgraph.conf.sample ifgraph/crontab.in +ifgraph/lib/rgb.txt ifgraph/templates/en/if-data.html ifgraph/templates/en/if-header.html ifgraph/templates/en/if-trailer.html @@ -30,6 +31,7 @@ ifgraph/templates/pt-br/main-trailer.html @dirrm ifgraph/templates/pt-br @dirrm ifgraph/templates @dirrm ifgraph/htdocs +@dirrm ifgraph/lib @dirrmtry ifgraph @dirrmtry var/ifgraph @dirrmtry var |