mirror of
https://github.com/unraid/api.git
synced 2026-01-13 12:09:52 -06:00
fix: flashbackup should generate any missing bz*.sha256 files
This commit is contained in:
@@ -1037,7 +1037,8 @@ $allbzfiles = ['bzimage','bzfirmware','bzmodules','bzroot','bzroot-gui'];
|
||||
foreach ($allbzfiles as $bzfile) {
|
||||
$sha256 = trim(@file_get_contents("/boot/$bzfile.sha256"));
|
||||
if (strlen($sha256) != 64) {
|
||||
response_complete(406, '{"error":"Invalid or missing '.$bzfile.'.sha256 file"}');
|
||||
$sha256 = hash_file('sha256', "/boot/$bzfile");
|
||||
file_put_contents("/boot/$bzfile.sha256", $sha256."\n");
|
||||
}
|
||||
$bzfilehashes[] = $sha256;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user