diff options
author | jim-p <jim@pingle.org> | 2010-04-15 17:08:20 -0400 |
---|---|---|
committer | jim-p <jim@pingle.org> | 2010-04-15 17:08:20 -0400 |
commit | 93b8266e2a93982b2b9a065821e59dc1a85f36e9 (patch) | |
tree | aaaca55a32ff07a0b28d226d4d382dd85da91534 | |
parent | 939e4a91d06aec5aaf71ed960cd91fa0483535dd (diff) | |
download | pfsense-93b8266e2a93982b2b9a065821e59dc1a85f36e9.zip pfsense-93b8266e2a93982b2b9a065821e59dc1a85f36e9.tar.gz |
Fail over update check to report the supplied version from the remote server if it is not a build time/datestamp.
-rwxr-xr-x | usr/local/www/system_firmware_check.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr/local/www/system_firmware_check.php b/usr/local/www/system_firmware_check.php index a857a3f..77c528c 100755 --- a/usr/local/www/system_firmware_check.php +++ b/usr/local/www/system_firmware_check.php @@ -122,9 +122,13 @@ $needs_system_upgrade = false; download_file_with_progress_bar("{$updater_url}/version", "/tmp/{$g['product_name']}_version"); $latest_version = str_replace("\n", "", @file_get_contents("/tmp/{$g['product_name']}_version")); $static_text .= "done.\n"; -if(!$latest_version) +if(!$latest_version) { $static_text .= "Unable to check for updates.\n"; -else { + if(isset($curcfg['alturl']['enable'])) + $static_text .= "Could not contact custom update server.\n"; + else + $static_text .= "Could not contact {$g['product_name']} update server {$updater_url}.\n"; +} else { $static_text .= "Downloading current version information..."; update_output_window($static_text); $current_installed_pfsense_version = str_replace("\n", "", file_get_contents("/etc/version.buildtime")); @@ -133,11 +137,7 @@ else { $static_text .= "done\n"; update_output_window($static_text); if(!$latest_build_version) { - $static_text .= "Unable to check for updates.\n"; - if(isset($curcfg['alturl']['enable'])) - $static_text .= "Could not contact custom update server.\n"; - else - $static_text .= "Could not contact {$g['product_name']} update server {$updater_url}.\n"; + $needs_system_upgrade = true; } else { if($current_installed_pfsense < $latest_build_version) { $needs_system_upgrade = true; |