From 93f71d31adc7cd10da84ef4c18be2e5e2f6c2498 Mon Sep 17 00:00:00 2001 From: Tim Wilkinson Date: Thu, 1 Dec 2022 12:55:27 -0800 Subject: [PATCH] Fix Bad Gateway error when trying to update with the wrong firmware (#556) --- files/www/cgi-bin/admin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/www/cgi-bin/admin b/files/www/cgi-bin/admin index 7facb012..4aeb0468 100755 --- a/files/www/cgi-bin/admin +++ b/files/www/cgi-bin/admin @@ -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