Fix Bad Gateway error when trying to update with the wrong firmware (#556)

This commit is contained in:
Tim Wilkinson 2022-12-01 12:55:27 -08:00 committed by GitHub
parent ed77cec3b9
commit 93f71d31ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -349,7 +349,7 @@ if parms.button_ul_fw and nixio.fs.stat("/tmp/web/upload/file") then
-- drop the page cache to take pressure off tmps when checking the firmware
write_all("/proc/sys/vm/drop_caches", "3")
-- check firmware header
if os.execute("/usr/local/bin/firmwarecheck.sh " .. tmpdir .. "/firmware") ~= 0 then
if os.execute("/usr/local/bin/firmwarecheck.sh " .. tmpdir .. "/firmware > /dev/null 2>&1") ~= 0 then
fwout("Firmware CANNOT be updated")
fwout("firmware file is not valid")
fw_install = false