summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_firmware.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/system_firmware.php')
-rwxr-xr-xusr/local/www/system_firmware.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/usr/local/www/system_firmware.php b/usr/local/www/system_firmware.php
index f6326dd..1a1c786 100755
--- a/usr/local/www/system_firmware.php
+++ b/usr/local/www/system_firmware.php
@@ -82,9 +82,14 @@ if($_POST) {
if($config['system']['proxy_auth_password'])
$http_auth_password = $config['system']['proxy_auth_password'];
- /* stub in custom firmware option */
- $firmwareurl=$g['firmwarebaseurl'];
- $firmwarename=$g['firmwarefilename'];
+ /* custom firmware option */
+ if (isset($config['system']['altfirmwareurl'])) {
+ $firmwareurl=$config['system']['firmwareurl'];
+ $firmwarename=$config['system']['firmwarename'];
+ } else {
+ $firmwareurl=$g['firmwarebaseurl'];
+ $firmwarename=$g['firmwarefilename'];
+ }
exec_rc_script_async("/etc/rc.firmware_auto {$firmwareurl} {$firmwarename} {$http_auth_username} {$http_auth_password}");
$savemsg = "pfSense is now auto upgrading. The firewall will automatically reboot if it succeeds.";
@@ -158,8 +163,12 @@ if ($_POST && !file_exists($d_firmwarelock_path)) {
}
}
} else {
+ /* Only check firmware version if we're setup to go against pfsense.org and user wants us to */
if (!isset($config['system']['disablefirmwarecheck']))
- $fwinfo = check_firmware_version();
+ if(!isset($config['system']['altfirmwareurl']))
+ $fwinfo = check_firmware_version();
+ else
+ $fwinfo = "Using alternate firmware URL, cannot determine if {$config['system']['firmwareurl']}{$config['system']['firmwarename']} is newer than current.";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
OpenPOWER on IntegriCloud