From 5ce9b6b2e82e09925f1fd9722d1f1c247acfad0a Mon Sep 17 00:00:00 2001 From: Neil Lathwood Date: Mon, 10 Apr 2017 14:11:56 +0100 Subject: [PATCH] feature: Added rrdtool version check to compare installed version with defined version (#6381) * feature: Added rrdtool version check to compare installed version with defined version * update to check config is not > than installed ver --- validate.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/validate.php b/validate.php index d2fc19d139..395cd95403 100755 --- a/validate.php +++ b/validate.php @@ -333,6 +333,11 @@ foreach ($bins as $bin) { } } +// Check that rrdtool config version is what we see +if (isset($config['rrdtool_version']) && (version_compare($config['rrdtool_version'], $versions['rrdtool_ver'], '>'))) { + print_fail('The rrdtool version you have specified is newer than what is installed.', "Either comment out \$config['rrdtool_version'] = {$config['rrdtool_version']}; or set \$config['rrdtool_version'] = {$versions['rrdtool_ver']};"); +} + $disabled_functions = explode(',', ini_get('disable_functions')); $required_functions = array('exec','passthru','shell_exec','escapeshellarg','escapeshellcmd','proc_close','proc_open','popen'); foreach ($required_functions as $function) {