distinguish between problematic binaries before commit 94932c1 and after
This commit is contained in:
@@ -1,21 +1,26 @@
|
||||
<?php
|
||||
$v = @file_get_contents('versions.txt');
|
||||
$versions = array();
|
||||
if ($v) {
|
||||
$v = explode("\n", $v);
|
||||
$func = function($val, $k) {
|
||||
global $versions;
|
||||
$val = explode('=', $val);
|
||||
if (count($val)>1) {
|
||||
$versions[$val[0]] = explode(',', $val[1]);
|
||||
}
|
||||
};
|
||||
array_walk($v, $func);
|
||||
function readVersions($old=false) {
|
||||
global $versions;
|
||||
$versions = array();
|
||||
$v = @file_get_contents(($old?'old':'').'versions.txt');
|
||||
if ($v) {
|
||||
$v = explode("\n", $v);
|
||||
$func = function($val, $k) {
|
||||
global $versions;
|
||||
$val = explode('=', $val);
|
||||
if (count($val)>1) {
|
||||
$versions[$val[0]] = explode(',', $val[1]);
|
||||
}
|
||||
};
|
||||
array_walk($v, $func);
|
||||
}
|
||||
}
|
||||
function checkUpdate($ebusdVersion, $ebusdRelease, $loadedFiles) {
|
||||
function checkUpdate($ebusdVersion, $ebusdRelease, $architecture, $loadedFiles) {
|
||||
if (!$ebusdVersion) {
|
||||
return 'invalid request';
|
||||
}
|
||||
readVersions($architecture && substr($architecture, 0, 3)!=='arm' && ($ebusdVersion<'3.3' || ($ebusdVersion==='3.3' && ($ebusdRelease==='v3.3' || (strtok($ebusdRelease, '-')==='v3.3') && strtok('-')<18))));
|
||||
global $versions;
|
||||
$ret = 'unknown';
|
||||
if ($ebusdVersion==$versions['ebusd'][0] && $ebusdRelease==$versions['ebusd'][1]) {
|
||||
@@ -39,7 +44,7 @@ function checkUpdate($ebusdVersion, $ebusdRelease, $loadedFiles) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (strlen($configs)>100) {
|
||||
if (strlen($configs)>1000) {
|
||||
return $ret.($newerAvailable?', '.$newerAvailable.' newer':', different').' configuration files available';
|
||||
}
|
||||
return $ret.$configs;
|
||||
|
||||
Reference in New Issue
Block a user