diff options
-rwxr-xr-x | usr/local/www/system_firmware.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/local/www/system_firmware.php b/usr/local/www/system_firmware.php index d21268c..6c77980 100755 --- a/usr/local/www/system_firmware.php +++ b/usr/local/www/system_firmware.php @@ -90,11 +90,13 @@ if ($_POST && !file_exists($d_firmwarelock_path)) { } } - if (!$input_errors && !file_exists($d_firmwarelock_path) && (!$sig_warning || $_POST['sig_override'])) { + if (!$input_errors && !file_exists($d_firmwarelock_path) && (!$sig_warning || $_POST['sig_override']) && file_exists("{$g['tmp_path']}/firmware.tgz")) { /* fire up the update script in the background */ touch($d_firmwarelock_path); $savemsg = "The firmware is now being updated. The firewall will reboot automatically."; mwexec_bg("/etc/rc.firmware pfSenseupgrade {$g['tmp_path']}/firmware.tgz"); + } else { + $savemsg = "Firmware image missing or other error, please try again."; } } } |