]> git.pld-linux.org Git - packages/cacti.git/blob - cacti-config.patch
- Add patch from date 2010/07/27 more info http://www.cacti.net/download_patches.php
[packages/cacti.git] / cacti-config.patch
1 --- cacti-0.8.7b/include/global.php~    2008-10-05 04:29:33.131404241 +0300
2 +++ cacti-0.8.7b/include/global.php     2008-10-05 04:38:29.740276226 +0300
3 @@ -101,7 +101,8 @@
4  $config["base_path"] = strtr(ereg_replace("(.*)[\/\\]include", "\\1", dirname(__FILE__)), "\\", "/");
5  $config["library_path"] = ereg_replace("(.*[\/\\])include", "\\1lib", dirname(__FILE__));
6  $config["include_path"] = dirname(__FILE__);
7 -$config["rra_path"] = $config["base_path"] . '/rra';
8 +$config["rra_path"] = '/var/lib/cacti/rra';
9 +$config["log_path"] = '/var/log/cacti';
10  
11  /* colors */
12  $colors["dark_outline"] = "454E53";
13 --- cacti-0.8.7a.orig/include/config.php        2007-11-17 19:11:52.000000000 +0100
14 +++ cacti-0.8.7a/include/config.php     2007-12-04 10:53:28.000000000 +0100
15 @@ -30,6 +30,8 @@
16  $database_password = "cactiuser";
17  $database_port = "3306";
18  
19 +require '/etc/webapps/cacti/config.php';
20 +
21  /* Default session name - Session name must contain alpha characters */
22  #$cacti_session_name = "Cacti";
23  
24 --- cacti-0.8.7b/include/global_settings.php~   2008-10-05 04:29:33.121404239 +0300
25 +++ cacti-0.8.7b/include/global_settings.php    2008-10-05 04:41:11.807395633 +0300
26 @@ -96,7 +96,7 @@
27                         "friendly_name" => "Cacti Log File Path",
28                         "description" => "The path to your Cacti log file (if blank, defaults to <path_cacti>/log/cacti.log)",
29                         "method" => "filepath",
30 -                       "default" => $config["base_path"] . "/log/cacti.log",
31 +                       "default" => $config["log_path"] . "/cacti.log",
32                         "max_length" => "255"
33                         ),
34                 "pollerpaths_header" => array(
35 --- cacti-0.8.7b/install/index.php~     2008-10-05 04:29:33.113733438 +0300
36 +++ cacti-0.8.7b/install/index.php      2008-10-05 04:41:37.276839747 +0300
37 @@ -244,7 +244,7 @@
38  if (config_value_exists("path_cactilog")) {
39         $input["path_cactilog"]["default"] = read_config_option("path_cactilog");
40  } else {
41 -       $input["path_cactilog"]["default"] = $config["base_path"] . "/log/cacti.log";
42 +       $input["path_cactilog"]["default"] = $config["log_path"] . "/cacti.log";
43  }
44  
45  /* SNMP Version */
46 --- cacti-0.8.7b/lib/functions.php~     2008-10-05 04:29:33.124737562 +0300
47 +++ cacti-0.8.7b/lib/functions.php      2008-10-05 04:42:05.046758504 +0300
48 @@ -367,7 +367,7 @@
49         /* Log to Logfile */
50         if ((($logdestination == 1) || ($logdestination == 2)) && (read_config_option("log_verbosity") != POLLER_VERBOSITY_NONE)) {
51                 if ($logfile == "") {
52 -                       $logfile = $config["base_path"] . "/log/cacti.log";
53 +                       $logfile = $config["log_path"] . "/cacti.log";
54                 }
55  
56                 /* echo the data to the log (append) */
57 --- cacti-0.8.7b/utilities.php~ 2008-10-05 04:29:33.128070807 +0300
58 +++ cacti-0.8.7b/utilities.php  2008-10-05 04:43:30.176737491 +0300
59 @@ -693,12 +693,12 @@
60  }
61  
62  function utilities_view_logfile() {
63 -       global $colors, $log_tail_lines, $page_refresh_interval;
64 +       global $config, $colors, $log_tail_lines, $page_refresh_interval;
65  
66         $logfile = read_config_option("path_cactilog");
67  
68         if ($logfile == "") {
69 -               $logfile = "./log/rrd.log";
70 +               $logfile = $config['log_path']. "/rrd.log";
71         }
72  
73         /* helps determine output color */
74 @@ -858,7 +858,7 @@
75  }
76  
77  function utilities_clear_logfile() {
78 -       global $colors;
79 +       global $config, $colors;
80  
81         load_current_session_value("refresh", "sess_logfile_refresh", read_config_option("log_refresh_interval"));
82  
83 @@ -870,7 +870,7 @@
84         $logfile = read_config_option("path_cactilog");
85  
86         if ($logfile == "") {
87 -               $logfile = "./log/cacti.log";
88 +               $logfile = $config['log_path']."/cacti.log";
89         }
90  
91         html_start_box("<strong>Clear Cacti Log File</strong>", "100%", $colors["header"], "1", "center", "");
92 --- cacti/poller.php~   2008-10-05 05:08:10.000000000 +0300
93 +++ cacti/poller.php    2008-10-05 05:11:11.327705168 +0300
94 @@ -1,3 +1,4 @@
95 +#!/usr/bin/php
96  <?php
97  /*
98   +-------------------------------------------------------------------------+
99 @@ -32,7 +32,7 @@
100  $no_http_headers = true;
101  
102  /* start initialization section */
103 -include(dirname(__FILE__) . "/include/global.php");
104 +require "/usr/share/cacti/include/global.php";
105  include_once($config["base_path"] . "/lib/poller.php");
106  include_once($config["base_path"] . "/lib/data_query.php");
107  include_once($config["base_path"] . "/lib/graph_export.php");
This page took 0.047245 seconds and 3 git commands to generate.