OSSP CVS Repository

ossp - Difference in ossp-pkg/flow2rrd/flow2rrd.pl versions 1.5 and 1.6
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/flow2rrd/flow2rrd.pl 1.5 -> 1.6

--- flow2rrd.pl  2004/12/26 12:32:38     1.5
+++ flow2rrd.pl  2004/12/26 13:10:39     1.6
@@ -1,11 +1,11 @@
-#!/usr/opkg/bin/perl
+#!@PERL@
 ##
 ##  OSSP flow2rrd -- NetFlow to Round-Robin Database (RRD)
 ##  Copyright (c) 2004 Ralf S. Engelschall <rse@engelschall.com>
 ##  Copyright (c) 2004 The OSSP Project <http://www.ossp.org/>
 ##
-##  This file is part of OSSP flow2rrd, a tool for storing NetFlow as
-##  RRD data which can be found at http://www.ossp.org/pkg/tool/flow2rrd/.
+##  This file is part of OSSP flow2rrd, a tool for storing NetFlow data
+##  into an RRD which can be found at http://www.ossp.org/pkg/tool/flow2rrd/.
 ##
 ##  This program is free software; you can redistribute it and/or modify
 ##  it under the terms of the GNU General Public License as published by
@@ -52,8 +52,7 @@
 my $my = {
     -progname => 'OSSP flow2rrd',
     -proghome => 'http://www.ossp.org/pkg/tool/flow2rrd/',
-    -progvers => '0.1.0',
-    -progdate => '20-Dec-2004',
+    -progvers => '@VERSION@',
 };
 
 #   run-time options
@@ -63,7 +62,7 @@
     -config   => 'flow2rrd.cfg',
     -store    => 0,
     -graph    => 0,
-    -cgi      => 0,
+    -cgi      => (($ENV{'GATEWAY_INTERFACE'} || "") eq 'CGI/1.1' ? 1 : 0)
 };
 
 #   parse command line options
@@ -90,7 +89,7 @@
     exit(0);
 }
 if ($opt->{-version}) {
-    print "$my->{-progname} $my->{-progvers} ($my->{-progdate})\n";
+    print "$my->{-progname} $my->{-progvers}\n";
     exit(0);
 }
 if (not $opt->{-store} and not $opt->{-graph} and not $opt->{-cgi}) {
@@ -802,8 +801,7 @@
         $graph =~ s|\@|\@$tmpfile:|s;
 
         #   generate graph image
-        #die "$0 --graph $graph";
-        my $rc = system("$0 --graph $graph");
+        my $rc = system("GATEWAY_INTERFACE=none $0 --graph $graph");
         if ($rc != 0) { # or not -s $tmpfile) {
             die "failed to generate graph image: $!";
         }
@@ -870,7 +868,7 @@
         $html .= "<a href=\"".$cgi->url(-relative => 1)."\">Real-Time Network Statistics</a>";
         $html << 1;
         $html >> "footer";
-        $html .= "<a href=\"$my->{-proghome}\">$my->{-progname}</a> $my->{-progvers} ($my->{-progdate})";
+        $html .= "<a href=\"$my->{-proghome}\">$my->{-progname}</a> $my->{-progvers}";
         $html << 1;
 
         my $width  = ($cgi->param("width")  || "800");
@@ -1018,7 +1016,7 @@
         $html .= "<a href=\"".$cgi->url(-relative => 1)."\">Real-Time Network Statistics</a>";
         $html << 1;
         $html >> "footer";
-        $html .= "<a href=\"$my->{-proghome}\">$my->{-progname}</a> $my->{-progvers} ($my->{-progdate})";
+        $html .= "<a href=\"$my->{-proghome}\">$my->{-progname}</a> $my->{-progvers}";
         $html << 1;
 
         $html >> "canvas";

CVSTrac 2.0.1