mirror of
https://github.com/unraid/api.git
synced 2026-01-13 03:59:58 -06:00
fix: flashbackup will now trap for missing bz files
This commit is contained in:
@@ -1035,6 +1035,9 @@ if ($command == 'deactivate') {
|
||||
$bzfilehashes = [];
|
||||
$allbzfiles = ['bzimage','bzfirmware','bzmodules','bzroot','bzroot-gui'];
|
||||
foreach ($allbzfiles as $bzfile) {
|
||||
if (!file_exists("/boot/$bzfile")) {
|
||||
response_complete(406, '{"error":"missing /boot/'.$bzfile.'"}');
|
||||
}
|
||||
$sha256 = trim(@file_get_contents("/boot/$bzfile.sha256"));
|
||||
if (strlen($sha256) != 64) {
|
||||
$sha256 = hash_file('sha256', "/boot/$bzfile");
|
||||
|
||||
Reference in New Issue
Block a user