From a509ff632bf6f748db99394d76b5f7f1f255f8a2 Mon Sep 17 00:00:00 2001 From: Bill Marquette Date: Sat, 12 Mar 2005 19:06:29 +0000 Subject: custom firmware URLs --- usr/local/www/system_advanced.php | 39 ++++++++++++++++++++++++++++++++++++--- usr/local/www/system_firmware.php | 17 +++++++++++++---- 2 files changed, 49 insertions(+), 7 deletions(-) (limited to 'usr') diff --git a/usr/local/www/system_advanced.php b/usr/local/www/system_advanced.php index 3b48baa..444619c 100755 --- a/usr/local/www/system_advanced.php +++ b/usr/local/www/system_advanced.php @@ -43,6 +43,9 @@ $pconfig['cert'] = base64_decode($config['system']['webgui']['certificate']); $pconfig['key'] = base64_decode($config['system']['webgui']['private-key']); $pconfig['disableconsolemenu'] = isset($config['system']['disableconsolemenu']); $pconfig['disablefirmwarecheck'] = isset($config['system']['disablefirmwarecheck']); +$pconfig['altfirmwareurl'] = $config['system']['altfirmwareurl']; +$pconfig['firmwareurl'] = $config['system']['firmwareurl']; +$pconfig['firmwarename'] = $config['system']['firmwarename']; $pconfig['expanddiags'] = isset($config['system']['webgui']['expanddiags']); if ($g['platform'] == "generic-pc") $pconfig['harddiskstandby'] = $config['system']['harddiskstandby']; @@ -75,6 +78,9 @@ if ($_POST) { $input_errors[] = "This certificate does not appear to be valid."; if (!strstr($_POST['key'], "BEGIN RSA PRIVATE KEY") || !strstr($_POST['key'], "END RSA PRIVATE KEY")) $input_errors[] = "This key does not appear to be valid."; + if ($_POST['altfirmwareurl']) + if ($_POST['firmwareurl'] == "" || $_POST['firmwarename'] == "") + $input_errors[] = "You must specify a base URL and a filename for the alternate firmware."; } if (!$input_errors) { @@ -101,6 +107,14 @@ if ($_POST) { $config['system']['webgui']['private-key'] = base64_encode($_POST['key']); $config['system']['disableconsolemenu'] = $_POST['disableconsolemenu'] ? true : false; $config['system']['disablefirmwarecheck'] = $_POST['disablefirmwarecheck'] ? true : false; + $config['system']['altfirmwareurl'] = $_POST['altfirmwareurl'] ? true : false; + if ($config['system']['altfirmwareurl']) { + $config['system']['firmwareurl'] = $_POST['firmwareurl']; + $config['system']['firmwarename'] = $_POST['firmwarename']; + } else { + unset($config['system']['firmwareurl']); + unset($config['system']['firmwarename']); + } $config['system']['webgui']['expanddiags'] = $_POST['expanddiags'] ? true : false; $config['system']['optimization'] = $_POST['optimization']; $config['system']['disablerendevouz'] = $_POST['disablerendevouz']; @@ -161,6 +175,16 @@ function enable_change(enable_over) { document.iform.ipv6nat_ipaddr.disabled = 1; } } +function enable_altfirmwareurl(enable_over) { + if (document.iform.altfirmwareurl.checked || enable_over) { + document.iform.firmwareurl.disabled = 0; + document.iform.firmwarename.disabled = 0; + } else { + document.iform.firmwareurl.disabled = 1; + document.iform.firmwarename.disabled = 1; + } +} + // --> @@ -277,14 +301,23 @@ function enable_change(enable_over) { Disable console menu
Changes to this option will take effect after a reboot.
- + Firmware version check > Disable firmware version check
This will cause pfSense not to check for newer firmware versions when the System: Firmware page is viewed.
- - + + + Alternate firmware URL + + > Use a different URL for firmware upgrades
+ Base URL:
+ Filename: +
+ This is where pfSense will check for newer firmware versions when System: Firmware page is viewed.
+ + Hard disk standby time