summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_firmware.php
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-08-13 04:31:29 +0000
committerBill Marquette <billm@pfsense.org>2005-08-13 04:31:29 +0000
commite4296d1183c9c00a3f74f04f0ff118fbeccdf6ed (patch)
tree956ace86929cee34abbb9088b9a6af4b0f67e823 /usr/local/www/system_firmware.php
parent829c52272ca572803aada19ff2196c93dd01f15f (diff)
downloadpfsense-e4296d1183c9c00a3f74f04f0ff118fbeccdf6ed.zip
pfsense-e4296d1183c9c00a3f74f04f0ff118fbeccdf6ed.tar.gz
Fix bad firmware logic
Diffstat (limited to 'usr/local/www/system_firmware.php')
-rwxr-xr-xusr/local/www/system_firmware.php19
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.";
+ }
+ }
}
}
}
OpenPOWER on IntegriCloud