diff options
author | Bill Marquette <billm@pfsense.org> | 2005-08-13 04:31:29 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-08-13 04:31:29 +0000 |
commit | e4296d1183c9c00a3f74f04f0ff118fbeccdf6ed (patch) | |
tree | 956ace86929cee34abbb9088b9a6af4b0f67e823 | |
parent | 829c52272ca572803aada19ff2196c93dd01f15f (diff) | |
download | pfsense-e4296d1183c9c00a3f74f04f0ff118fbeccdf6ed.zip pfsense-e4296d1183c9c00a3f74f04f0ff118fbeccdf6ed.tar.gz |
Fix bad firmware logic
-rwxr-xr-x | usr/local/www/system_firmware.php | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/usr/local/www/system_firmware.php b/usr/local/www/system_firmware.php index 6c77980..99c5754 100755 --- a/usr/local/www/system_firmware.php +++ b/usr/local/www/system_firmware.php @@ -90,14 +90,17 @@ if ($_POST && !file_exists($d_firmwarelock_path)) { } } - 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."; - } + /* Check for input errors, firmware locks, warnings, then check for firmware if sig_override is set */ + if (!$input_errors && !file_exists($d_firmwarelock_path) && (!$sig_warning || $_POST['sig_override'])) { + if (!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."; + } + } } } } |