LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File collectd-collection3.patch of Package collectd (Project server:monitoring)

--- contrib/collection3/bin/graph.cgi.orig	2009-10-07 23:29:32.000000000 +0200
+++ contrib/collection3/bin/graph.cgi	2009-10-07 23:51:50.000000000 +0200
@@ -2,10 +2,9 @@
 
 use strict;
 use warnings;
-use lib ('../lib');
+use lib ('/usr/lib/collectd-js');
 use utf8;
 
-use FindBin ('$RealBin');
 use Carp (qw(confess cluck));
 use CGI (':cgi');
 use RRDs ();
@@ -49,7 +48,7 @@
 HTTP
 }
 
-gc_read_config ("$RealBin/../etc/collection.conf");
+gc_read_config ("/etc/collectd/collection-js.conf");
 
 if ($GraphWidth)
 {
--- contrib/collection3/bin/index.cgi.orig	2009-10-07 23:30:27.000000000 +0200
+++ contrib/collection3/bin/index.cgi	2009-10-07 23:52:09.000000000 +0200
@@ -17,11 +17,10 @@
 
 use strict;
 use warnings;
-use lib ('../lib');
+use lib ('/usr/lib/collectd-js');
 use utf8;
 
 use Carp (qw(cluck confess));
-use FindBin ('$RealBin');
 use CGI (':cgi');
 use CGI::Carp ('fatalsToBrowser');
 use HTML::Entities ('encode_entities');
@@ -59,7 +58,7 @@
   exit 1;
 }
 
-gc_read_config ("$RealBin/../etc/collection.conf");
+gc_read_config ("/etc/collectd/collection-js.conf");
 
 $Actions{$action}->();
 exit (0);
@@ -144,9 +143,9 @@
   print <<HTML;
   <head>
     <title>collection.cgi, Version 3</title>
-    <link rel="icon" href="../share/shortcut-icon.png" type="image/png" />
-    <link rel="stylesheet" href="../share/style.css" type="text/css" />
-    <script type="text/javascript" src="../share/navigate.js"></script>
+    <link rel="icon" href="shortcut-icon.png" type="image/png" />
+    <link rel="stylesheet" href="style.css" type="text/css" />
+    <script type="text/javascript" src="navigate.js"></script>
   </head>
   <body onload="nav_init ($begin, $end);">
 HTML
--- contrib/collection3/bin/json.cgi.orig	2009-10-07 23:30:58.000000000 +0200
+++ contrib/collection3/bin/json.cgi	2009-10-07 23:51:33.000000000 +0200
@@ -17,10 +17,9 @@
 
 use strict;
 use warnings;
-use lib ('../lib');
+use lib ('/usr/lib/collectd-js');
 use utf8;
 
-use FindBin ('$RealBin');
 use CGI (':cgi');
 use CGI::Carp ('fatalsToBrowser');
 use URI::Escape ('uri_escape');
@@ -36,7 +35,7 @@
 our $Debug = param ('debug') ? 1 : 0;
 our $ServerName = 'collect.noris.net';
 
-gc_read_config ("$RealBin/../etc/collection.conf");
+gc_read_config ("/etc/collectd/collection-js.conf");
 
 if ($Debug)
 {
--- contrib/collection3/etc/collection.conf.orig	2009-10-07 23:52:29.000000000 +0200
+++ contrib/collection3/etc/collection.conf	2009-10-07 23:52:34.000000000 +0200
@@ -1,4 +1,4 @@
-#DataDir "/var/lib/collectd/rrd"
+#DataDir "/var/lib/collectd"
 GraphWidth 400
 #UnixSockAddr "/var/run/collectd-unixsock"
 <Type apache_bytes>
--- contrib/collection3/lib/Collectd/Graph/Common.pm.orig	2009-10-07 23:36:33.000000000 +0200
+++ contrib/collection3/lib/Collectd/Graph/Common.pm	2009-10-07 23:36:39.000000000 +0200
@@ -44,7 +44,7 @@
   flush_files
 ));
 
-our $DefaultDataDir = '/var/lib/collectd/rrd';
+our $DefaultDataDir = '/var/lib/collectd';
 
 return (1);
 
--- contrib/collection3/lib/Collectd/Graph/Config.pm.orig	2009-10-07 23:35:15.000000000 +0200
+++ contrib/collection3/lib/Collectd/Graph/Config.pm	2009-10-07 23:35:31.000000000 +0200
@@ -57,7 +57,7 @@
     return (1);
   }
 
-  $file ||= "etc/collection.conf";
+  $file ||= "/etc/collectd/collection-js.conf";
 
   %conf = ParseConfig (-ConfigFile => $file,
     -LowerCaseNames => 1,
--- contrib/collection3/lib/Collectd/Config.pm.orig	2009-10-07 23:32:23.000000000 +0200
+++ contrib/collection3/lib/Collectd/Config.pm	2009-10-07 23:34:57.000000000 +0200
@@ -58,7 +58,7 @@
     return (1);
   }
 
-  $file ||= "etc/collection.conf";
+  $file ||= "/etc/collectd/collection-js.conf";
 
   %conf = ParseConfig (-ConfigFile => $file,
     -LowerCaseNames => 1,