mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Removed -O parameter from rrdtool command line.
-O does not exists in RRDTool < 1.4.3 (CentOS 6 uses 1.3.8 by default). Checking RRD file existence with rrdtool_check_rrd_exists() instead.
This commit is contained in:
@ -152,7 +152,7 @@ function rrdtool_graph($graph_file, $options)
|
||||
function rrdtool($command, $filename, $options, $timeout = 0)
|
||||
{
|
||||
global $config, $debug, $rrd_pipes, $console_color;
|
||||
|
||||
|
||||
// rrdcached commands: >=1.5.5: all, >=1.5 all: except tune, <1.5: all except tune and create
|
||||
if ($config['rrdcached'] &&
|
||||
(version_compare($config['rrdtool_version'], '1.5.5', '>=') ||
|
||||
@ -175,7 +175,7 @@ function rrdtool($command, $filename, $options, $timeout = 0)
|
||||
) {
|
||||
print $console_color->convert('[%rRRD Disabled%n]');
|
||||
$output = array(null, null);
|
||||
} else if ($command == 'create' && file_exists($filename)){ // do not ovewrite files when creating
|
||||
} else if ($command == 'create' && rrdtool_check_rrd_exists($filename)){ // do not ovewrite files when creating
|
||||
print $console_color->convert('[%yRRD file ' . $filename . ' already exist%n]');
|
||||
$output = array(null, null);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user