[packages/cacti] - rel 2; few logs locations fixed
arekm
arekm at pld-linux.org
Thu Sep 26 11:28:25 CEST 2019
commit 3d449d4fce320675abffa4d376072ca040a2c75a
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Sep 26 11:28:18 2019 +0200
- rel 2; few logs locations fixed
cacti-config.patch | 34 ++++++++++++++++++++++++++++++++++
cacti.spec | 2 +-
2 files changed, 35 insertions(+), 1 deletion(-)
---
diff --git a/cacti.spec b/cacti.spec
index c1b7a12..925617f 100644
--- a/cacti.spec
+++ b/cacti.spec
@@ -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
diff --git a/cacti-config.patch b/cacti-config.patch
index b656fba..49feed2 100644
--- a/cacti-config.patch
+++ b/cacti-config.patch
@@ -47,3 +47,37 @@
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) {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/cacti.git/commitdiff/3d449d4fce320675abffa4d376072ca040a2c75a
More information about the pld-cvs-commit
mailing list