]> git.pld-linux.org Git - packages/cacti.git/blob - cacti-config.patch
- updated Plugin Archidecture to 2.9
[packages/cacti.git] / cacti-config.patch
1 --- cacti-0.8.7b/include/global.php     2008-10-05 04:38:29.740276226 +0300
2 +++ cacti-0.8.7g/include/global.php     2010-12-13 12:10:44.312310245 +0200
3 @@ -42,7 +42,7 @@
4  $cacti_session_name = "Cacti";
5  
6  /* Include configuration */
7 -include(dirname(__FILE__) . "/config.php");
8 +require '/etc/webapps/cacti/config.php';
9  
10  if (isset($config["cacti_version"])) {
11         die("Invalid include/config.php file detected.");
12 @@ -101,7 +101,8 @@
13  $config["base_path"] = strtr(ereg_replace("(.*)[\/\\]include", "\\1", dirname(__FILE__)), "\\", "/");
14  $config["library_path"] = ereg_replace("(.*[\/\\])include", "\\1lib", dirname(__FILE__));
15  $config["include_path"] = dirname(__FILE__);
16 -$config["rra_path"] = $config["base_path"] . '/rra';
17 +$config["rra_path"] = '/var/lib/cacti/rra';
18 +$config["log_path"] = '/var/log/cacti';
19  
20  /* colors */
21  $colors["dark_outline"] = "454E53";
22 --- cacti-0.8.7g/include/config.php~    2010-12-13 12:15:08.000000000 +0200
23 +++ cacti-0.8.7g/include/config.php     2010-12-13 12:16:09.275611204 +0200
24 @@ -26,8 +26,8 @@
25  $database_type = "mysql";
26  $database_default = "cacti";
27  $database_hostname = "localhost";
28 -$database_username = "cactiuser";
29 -$database_password = "cactiuser";
30 +$database_username = "mysql";
31 +$database_password = "";
32  $database_port = "3306";
33  
34  /* load up old style plugins here */
35 @@ -39,9 +39,7 @@
36     ex: if your cacti install as at http://serverip/cacti/ this
37     would be set to /cacti/
38  */
39 -$url_path = "/";
40 +$url_path = '/cacti/';
41  
42  /* Default session name - Session name must contain alpha characters */
43  #$cacti_session_name = "Cacti";
44 -
45 -?>
46 --- cacti-0.8.7b/include/global_settings.php~   2008-10-05 04:29:33.121404239 +0300
47 +++ cacti-0.8.7b/include/global_settings.php    2008-10-05 04:41:11.807395633 +0300
48 @@ -96,7 +96,7 @@
49                         "friendly_name" => "Cacti Log File Path",
50                         "description" => "The path to your Cacti log file (if blank, defaults to <path_cacti>/log/cacti.log)",
51                         "method" => "filepath",
52 -                       "default" => $config["base_path"] . "/log/cacti.log",
53 +                       "default" => $config["log_path"] . "/cacti.log",
54                         "max_length" => "255"
55                         ),
56                 "pollerpaths_header" => array(
57 --- cacti-0.8.7b/install/index.php~     2008-10-05 04:29:33.113733438 +0300
58 +++ cacti-0.8.7b/install/index.php      2008-10-05 04:41:37.276839747 +0300
59 @@ -244,7 +244,7 @@
60  if (config_value_exists("path_cactilog")) {
61         $input["path_cactilog"]["default"] = read_config_option("path_cactilog");
62  } else {
63 -       $input["path_cactilog"]["default"] = $config["base_path"] . "/log/cacti.log";
64 +       $input["path_cactilog"]["default"] = $config["log_path"] . "/cacti.log";
65  }
66  
67  /* SNMP Version */
68 --- cacti-0.8.7b/lib/functions.php~     2008-10-05 04:29:33.124737562 +0300
69 +++ cacti-0.8.7b/lib/functions.php      2008-10-05 04:42:05.046758504 +0300
70 @@ -367,7 +367,7 @@
71         /* Log to Logfile */
72         if ((($logdestination == 1) || ($logdestination == 2)) && (read_config_option("log_verbosity") != POLLER_VERBOSITY_NONE)) {
73                 if ($logfile == "") {
74 -                       $logfile = $config["base_path"] . "/log/cacti.log";
75 +                       $logfile = $config["log_path"] . "/cacti.log";
76                 }
77  
78                 /* echo the data to the log (append) */
79 --- cacti-0.8.7b/utilities.php~ 2008-10-05 04:29:33.128070807 +0300
80 +++ cacti-0.8.7b/utilities.php  2008-10-05 04:43:30.176737491 +0300
81 @@ -693,12 +693,12 @@
82  }
83  
84  function utilities_view_logfile() {
85 -       global $colors, $log_tail_lines, $page_refresh_interval;
86 +       global $config, $colors, $log_tail_lines, $page_refresh_interval;
87  
88         $logfile = read_config_option("path_cactilog");
89  
90         if ($logfile == "") {
91 -               $logfile = "./log/rrd.log";
92 +               $logfile = $config['log_path']. "/rrd.log";
93         }
94  
95         /* helps determine output color */
96 @@ -858,7 +858,7 @@
97  }
98  
99  function utilities_clear_logfile() {
100 -       global $colors;
101 +       global $config, $colors;
102  
103         load_current_session_value("refresh", "sess_logfile_refresh", read_config_option("log_refresh_interval"));
104  
105 @@ -870,7 +870,7 @@
106         $logfile = read_config_option("path_cactilog");
107  
108         if ($logfile == "") {
109 -               $logfile = "./log/cacti.log";
110 +               $logfile = $config['log_path']."/cacti.log";
111         }
112  
113         html_start_box("<strong>Clear Cacti Log File</strong>", "100%", $colors["header"], "1", "center", "");
114 --- cacti/poller.php~   2008-10-05 05:08:10.000000000 +0300
115 +++ cacti/poller.php    2008-10-05 05:11:11.327705168 +0300
116 @@ -1,3 +1,4 @@
117 +#!/usr/bin/php
118  <?php
119  /*
120   +-------------------------------------------------------------------------+
121 @@ -32,7 +32,7 @@
122  $no_http_headers = true;
123  
124  /* start initialization section */
125 -include(dirname(__FILE__) . "/include/global.php");
126 +require "/usr/share/cacti/include/global.php";
127  include_once($config["base_path"] . "/lib/poller.php");
128  include_once($config["base_path"] . "/lib/data_query.php");
129  include_once($config["base_path"] . "/lib/graph_export.php");
This page took 0.042397 seconds and 3 git commands to generate.