This commit is contained in:
f0o 2015-10-02 02:00:28 +00:00
parent 6c803a5522
commit 81b4fbf221
No known key found for this signature in database
GPG Key ID: 239034DF4C471089

View File

@ -191,7 +191,7 @@ function rrdtool($command, $filename, $options) {
print $console_color->convert('RRD[%g'.$cmd.'%n] ');
}
else {
$tmp = stream_get_contents($rrd_pipes[1]).stream_get_contents($rrd_pipes[2]);
return array(stream_get_contents($rrd_pipes[1]),stream_get_contents($rrd_pipes[2]));
}
}
@ -206,6 +206,12 @@ function rrdtool($command, $filename, $options) {
function rrdtool_create($filename, $options) {
if( $config['rrdcached'] && $config['rrdtool_version'] >= 1.5 ) {
$chk = rrdtool('info', $filename);
if (!empty($chk[0])) {
return true;
}
}
return rrdtool('create', $filename, str_replace(array("\r", "\n"), '', $options));
}