]> git.pld-linux.org Git - packages/cacti.git/commitdiff
- rel 2; few logs locations fixed auto/th/cacti-1.2.6-2
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 26 Sep 2019 09:28:18 +0000 (11:28 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 26 Sep 2019 09:28:18 +0000 (11:28 +0200)
cacti-config.patch
cacti.spec

index b656fba64646cf7a3e8340dc08f1d9fcde3966bb..49feed282dfa4b88a2a515eb19051ec2fcc3471b 100644 (file)
  require_once($config['base_path'] . '/lib/data_query.php');
  require_once($config['base_path'] . '/lib/rrd.php');
 
+diff -ur cacti-1.2.6.org/install/functions.php cacti-1.2.6/install/functions.php
+--- cacti-1.2.6.org/install/functions.php      2019-09-02 10:23:43.000000000 +0200
++++ cacti-1.2.6/install/functions.php  2019-09-26 11:19:59.780907049 +0200
+@@ -794,8 +794,8 @@
+                       $section = 'general';
+               }
+               $logfile = 'install' . '-' . $section;
+-              file_put_contents($config['base_path'] . '/log/' . $logfile . '.log', sprintf($format_log1, $day, $time, $levelname, $data, PHP_EOL), $flags);
+-              file_put_contents($config['base_path'] . '/log/install-complete.log', sprintf($format_log2, $day, $time, $sectionname, $levelname, $data, PHP_EOL), $flags);
++              file_put_contents('/var/log/cacti/' . $logfile . '.log', sprintf($format_log1, $day, $time, $levelname, $data, PHP_EOL), $flags);
++              file_put_contents('/var/log/cacti/install-complete.log', sprintf($format_log2, $day, $time, $sectionname, $levelname, $data, PHP_EOL), $flags);
+       }
+ }
+diff -ur cacti-1.2.6.org/lib/installer.php cacti-1.2.6/lib/installer.php
+--- cacti-1.2.6.org/lib/installer.php  2019-09-02 10:23:43.000000000 +0200
++++ cacti-1.2.6/lib/installer.php      2019-09-26 11:20:54.749208954 +0200
+@@ -465,7 +465,6 @@
+               $always_paths = array(
+                       sys_get_temp_dir(),
+-                      $config['base_path'] . '/log',
+                       $config['base_path'] . '/cache/boost',
+                       $config['base_path'] . '/cache/mibcache',
+                       $config['base_path'] . '/cache/realtime',
+@@ -3216,7 +3215,7 @@
+               global $config;
+               $page_nr = 1;
+-              $logcontents = tail_file($config['base_path'] . '/log/cacti.log', 100, -1, ' INSTALL:' , $page_nr, $total_rows);
++              $logcontents = tail_file('/var/log/cacti/cacti.log', 100, -1, ' INSTALL:' , $page_nr, $total_rows);
+               $output_log = '';
+               foreach ($logcontents as $logline) {
index c1b7a125694b181c449b946ac9533e840395e8c4..925617f1a32baef648a5104a2a98d05486cdacbc 100644 (file)
@@ -5,7 +5,7 @@ Summary:        Cacti is a PHP frontend for rrdtool
 Summary(pl.UTF-8):     Cacti - frontend w PHP do rrdtoola
 Name:          cacti
 Version:       1.2.6
-Release:       1
+Release:       2
 License:       GPL v2
 Group:         Applications/WWW
 Source0:       http://www.cacti.net/downloads/%{name}-%{version}.tar.gz
This page took 0.083878 seconds and 4 git commands to generate.