diff options
author | Steve Wills <swills@FreeBSD.org> | 2019-01-06 16:32:03 +0000 |
---|---|---|
committer | Steve Wills <swills@FreeBSD.org> | 2019-01-06 16:32:03 +0000 |
commit | 7c413a84c2baa1211076782b4b7241e31f1694cf (patch) | |
tree | bf37f3b404ad7fcccea29813acb9abe741baa248 /net-mgmt/cacti/files | |
parent | b2b618779fcc4f1646eecdaaa5202be7fd9b8826 (diff) | |
download | ports-7c413a84c2baa1211076782b4b7241e31f1694cf.tar.gz ports-7c413a84c2baa1211076782b4b7241e31f1694cf.zip |
Notes
Diffstat (limited to 'net-mgmt/cacti/files')
-rw-r--r-- | net-mgmt/cacti/files/patch-include__global.php | 4 | ||||
-rw-r--r-- | net-mgmt/cacti/files/patch-include__global_settings.php | 11 | ||||
-rw-r--r-- | net-mgmt/cacti/files/patch-install__functions.php | 12 | ||||
-rw-r--r-- | net-mgmt/cacti/files/patch-lib__clog_webapi.php | 17 | ||||
-rw-r--r-- | net-mgmt/cacti/files/patch-lib__functions.php | 20 | ||||
-rw-r--r-- | net-mgmt/cacti/files/patch-lib_installer.php | 11 | ||||
-rw-r--r-- | net-mgmt/cacti/files/patch-poller_maintenance.php | 10 | ||||
-rw-r--r-- | net-mgmt/cacti/files/patch-scripts__diskfree.pl | 9 |
8 files changed, 44 insertions, 50 deletions
diff --git a/net-mgmt/cacti/files/patch-include__global.php b/net-mgmt/cacti/files/patch-include__global.php index 9359b85e2555..1f3b18d8de97 100644 --- a/net-mgmt/cacti/files/patch-include__global.php +++ b/net-mgmt/cacti/files/patch-include__global.php @@ -1,6 +1,6 @@ ---- include/global.php.orig 2017-08-13 04:06:37 UTC +--- include/global.php.orig 2019-01-03 02:14:26 UTC +++ include/global.php -@@ -139,7 +139,7 @@ if ($config['cacti_server_os'] == 'win32') { +@@ -173,7 +173,7 @@ if ($config['cacti_server_os'] == 'win32') { $config['library_path'] = preg_replace("/(.*[\/])include/", "\\1lib", dirname(__FILE__)); } $config['include_path'] = dirname(__FILE__); diff --git a/net-mgmt/cacti/files/patch-include__global_settings.php b/net-mgmt/cacti/files/patch-include__global_settings.php index 61f26937a64d..c4bc62a1835e 100644 --- a/net-mgmt/cacti/files/patch-include__global_settings.php +++ b/net-mgmt/cacti/files/patch-include__global_settings.php @@ -1,14 +1,15 @@ ---- include/global_settings.php.orig 2018-02-26 01:12:03 UTC +--- include/global_settings.php.orig 2019-01-03 02:14:26 UTC +++ include/global_settings.php -@@ -143,9 +143,9 @@ $settings = array( +@@ -160,10 +160,10 @@ $settings = array( ), 'path_cactilog' => array( 'friendly_name' => __('Cacti Log Path'), - 'description' => __('The path to your Cacti log file (if blank, defaults to <path_cacti>/log/cacti.log)'), + 'description' => __('The path to your Cacti log file (if blank, defaults to /var/log/cacti/log)'), 'method' => 'filepath', + 'file_type' => 'ascii', - 'default' => $config['base_path'] . '/log/cacti.log', -+ 'default' => '/var/log/cacti/log', - 'max_length' => '255' ++ 'default' => /var/log/cacti/log', + 'max_length' => '255', + 'install_check' => 'writable' ), - 'logrotate_enabled' => array( diff --git a/net-mgmt/cacti/files/patch-install__functions.php b/net-mgmt/cacti/files/patch-install__functions.php index b8503f30b529..59a76dbe1494 100644 --- a/net-mgmt/cacti/files/patch-install__functions.php +++ b/net-mgmt/cacti/files/patch-install__functions.php @@ -1,11 +1,11 @@ ---- install/functions.php.orig 2017-08-13 04:06:37 UTC +--- install/functions.php.orig 2019-01-03 02:14:26 UTC +++ install/functions.php -@@ -432,7 +432,7 @@ function install_file_paths () { - if (config_value_exists('path_cactilog')) { - $input['path_cactilog']['default'] = read_config_option('path_cactilog'); - } else { +@@ -528,7 +528,7 @@ function install_file_paths() { + /* log file path */ + $input['path_cactilog'] = $settings['path']['path_cactilog']; + if (empty($input['path_cactilog']['default'])) { - $input['path_cactilog']['default'] = $config['base_path'] . '/log/cacti.log'; + $input['path_cactilog']['default'] = '/var/log/cacti/log'; } - /* Theme */ + /* stderr log file path */ diff --git a/net-mgmt/cacti/files/patch-lib__clog_webapi.php b/net-mgmt/cacti/files/patch-lib__clog_webapi.php index 3020b29772cd..c44373e46bde 100644 --- a/net-mgmt/cacti/files/patch-lib__clog_webapi.php +++ b/net-mgmt/cacti/files/patch-lib__clog_webapi.php @@ -1,20 +1,11 @@ ---- lib/clog_webapi.php.orig 2017-08-13 04:06:37 UTC +--- lib/clog_webapi.php.orig 2019-01-03 02:14:26 UTC +++ lib/clog_webapi.php -@@ -42,7 +42,7 @@ function clog_purge_logfile() { - $logfile = read_config_option('path_cactilog'); +@@ -56,7 +56,7 @@ function clog_validate_filename(&$file, &$filepath, &$ + $logbase = basename($logfile); if ($logfile == '') { - $logfile = $config['base_path'] . '/log/cacti.log'; + $logfile = '/var/log/cacti/log'; } - $purgefile = dirname($logfile) . '/' . get_nfilter_request_var('filename'); -@@ -85,7 +85,7 @@ function clog_view_logfile() { - $logfile = $requestedFile; - } - } elseif ($logfile == '') { -- $logfile = $config['base_path'] . '/log/cacti.log'; -+ $logfile = '/var/log/cacti/log'; - } - - /* ================= input validation and session storage ================= */ + $errfile = read_config_option('path_stderrlog'); diff --git a/net-mgmt/cacti/files/patch-lib__functions.php b/net-mgmt/cacti/files/patch-lib__functions.php index d4c5acaa47e2..8b0cbfb61bef 100644 --- a/net-mgmt/cacti/files/patch-lib__functions.php +++ b/net-mgmt/cacti/files/patch-lib__functions.php @@ -1,11 +1,11 @@ ---- lib/functions.php.orig 2017-08-13 04:06:37 UTC +--- lib/functions.php.orig 2019-01-03 02:14:26 UTC +++ lib/functions.php -@@ -615,7 +615,7 @@ function cacti_log($string, $output = false, $environ - /* Log to Logfile */ - if (($logdestination == 1 || $logdestination == 2) && read_config_option('log_verbosity') != POLLER_VERBOSITY_NONE) { - if ($logfile == '') { -- $logfile = $config['base_path'] . '/log/cacti.log'; -+ $logfile = '/var/log/cacti/log'; - } - - /* echo the data to the log (append) */ +@@ -818,7 +818,7 @@ function cacti_log_file() { + global $config; + $logfile = read_config_option('path_cactilog'); + if ($logfile == '') { +- $logfile = $config['base_path'] . '/log/cacti.log'; ++ $logfile = '/var/log/cacti/log'; + } + $config['log_path'] = $logfile; + return $logfile; diff --git a/net-mgmt/cacti/files/patch-lib_installer.php b/net-mgmt/cacti/files/patch-lib_installer.php new file mode 100644 index 000000000000..612b8c5f077d --- /dev/null +++ b/net-mgmt/cacti/files/patch-lib_installer.php @@ -0,0 +1,11 @@ +--- lib/installer.php.orig 2019-01-06 07:22:22 UTC ++++ lib/installer.php +@@ -3222,7 +3222,7 @@ class Installer implements JsonSerializable { + + public static function getInstallLog() { + global $config; +- $logcontents = tail_file($config['base_path'] . '/log/cacti.log', 100, -1, ' INSTALL:' , 1, $total_rows); ++ $logcontents = tail_file('/var/log/cacti/log', 100, -1, ' INSTALL:' , 1, $total_rows); + + $output_log = ''; + foreach ($logcontents as $logline) { diff --git a/net-mgmt/cacti/files/patch-poller_maintenance.php b/net-mgmt/cacti/files/patch-poller_maintenance.php index a52b73363c1e..a166749a5017 100644 --- a/net-mgmt/cacti/files/patch-poller_maintenance.php +++ b/net-mgmt/cacti/files/patch-poller_maintenance.php @@ -1,11 +1,11 @@ ---- poller_maintenance.php.orig 2018-02-26 01:12:04 UTC +--- poller_maintenance.php.orig 2019-01-03 02:14:26 UTC +++ poller_maintenance.php -@@ -223,7 +223,7 @@ function logrotate_rotatenow () { - +@@ -227,7 +227,7 @@ function logrotate_rotatenow() { + $logs = array(); $log = read_config_option('path_cactilog'); - if ($log == '') { + if (empty($log)) { - $log = $config['base_path'] . '/log/cacti.log'; + $log = '/var/log/cacti/log'; } + $logs['Cacti'] = $log; - $run_time = time(); diff --git a/net-mgmt/cacti/files/patch-scripts__diskfree.pl b/net-mgmt/cacti/files/patch-scripts__diskfree.pl deleted file mode 100644 index ff923d580503..000000000000 --- a/net-mgmt/cacti/files/patch-scripts__diskfree.pl +++ /dev/null @@ -1,9 +0,0 @@ ---- scripts/diskfree.pl.orig 2017-04-26 00:30:09 UTC -+++ scripts/diskfree.pl -@@ -1,5 +1,5 @@ - #!/usr/bin/perl --open(PROCESS,"df --block-size=1024 -P $ARGV[0] | grep -v Filesystem |"); -+open(PROCESS,"df -k $ARGV[0] | grep -v Filesystem |"); - foreach (<PROCESS>) { - if ($_ =~ /($ARGV[0])(.* )(.*[0-9])(.* )(.*[0-9])(.* )(.*[0-9])(.* )(.*[0-9])%(.* )/) { - print "megabytes:$7 percent:$9"; |