Fix bad firmware logic

This commit is contained in:
Bill Marquette 2005-08-13 04:31:29 +00:00
parent 829c52272c
commit e4296d1183

View File

@ -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.";
}
}
}
}
}