summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-04-18 00:52:45 +0000
committerColin Smith <colin@pfsense.org>2005-04-18 00:52:45 +0000
commit6a692182c94edb3b17a6b523dd7a993c38714afb (patch)
tree6b83fe04fbfe88a31dce1f998cec53dffb04abb9 /usr
parent3bf1e0e7854e0ca0e061ab43d3d1f3c4f923d737 (diff)
downloadpfsense-6a692182c94edb3b17a6b523dd7a993c38714afb.zip
pfsense-6a692182c94edb3b17a6b523dd7a993c38714afb.tar.gz
Update auto updater.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/system_firmware_auto.php58
1 files changed, 45 insertions, 13 deletions
diff --git a/usr/local/www/system_firmware_auto.php b/usr/local/www/system_firmware_auto.php
index 4fbe8bb..53915c7 100755
--- a/usr/local/www/system_firmware_auto.php
+++ b/usr/local/www/system_firmware_auto.php
@@ -171,32 +171,64 @@ if($use_old_checkversion == false) {
update_status("No updates required.");
}
- $pfSense_firmware_filename="pfSense-firmware-{$firmware_version}.tgz";
$kernel_filename="pfSense-kernel-{$kernel_version}.tgz";
$base_filename="pfSense-base-{$base_version}.tgz";
if($needs_firmware_upgrade == true) {
+ $static_text .= "Downloading firmware updates... ";
$i = 0;
foreach($versions[0] as $tofetch) {
- $static_text .= "Installing firmware updates... ";
+ $todownload = substr(strrchr($tofetch, '-'), 1);
+ $static_text .= $todownload;
+ update_output_window($static_text . " ");
+ $firmware_filename="pfSense-firmware-{$todownload}.tgz";
+ download_file_with_progress_bar("http://www.pfSense.com/updates/{$firmware_filename}", "/tmp/{$firmware_filename}");
+ if($i == count($versions[0]) -1) {
+ $static_text .= ".\n";
+ } else {
+ $static_text .= ", ";
+ }
update_output_window($static_text);
- $status = download_file_with_progress_bar("http://www.pfSense.com/updates/{$pfSense_firmware_filename}", "/tmp/latest.tgz");
- $static_status .= "done. ";
+ $i++;
+ }
}
if($needs_kernel_upgrade == true) {
- $static_status .= "Downloading kernel update... ";
- update_status($static_status);
- $status = download_file_with_progress_bar("http://www.pfSense.com/updates/{$kernel_filename}", "/tmp/latest_kernel.tgz");
- $static_status .= "done. ";
+ $static_text .= "Downloading kernel updates... ";
+ $i = 0;
+ foreach($versions[1] as $tofetch) {
+ $todownload = substr(strrchr($tofetch, '-'), 1);
+ $static_text .= $todownload;
+ update_output_window($static_text . " ");
+ $kernel_filename="pfSense-kernel-{$todownload}.tgz";
+ download_file_with_progress_bar("http://www.pfSense.com/updates/{$kernel_filename}", "/tmp/{$kernel_filename}");
+ if($i == count($versions[1]) -1) {
+ $static_text .= ".\n";
+ } else {
+ $static_text .= ", ";
+ }
+ update_output_window($static_text);
+ $i++;
+ }
}
if($needs_base_upgrade == true) {
- $static_status .= "Downloading base update... ";
- update_status($static_status);
- $status = download_file_with_progress_bar("http://www.pfSense.com/updates/{$base_filename}", "/tmp/latest_base.tgz");
- $static_status .= "done. ";
- update_status($static_status);
+ $static_text .= "Downloading base updates... ";
+ $i = 0;
+ foreach($versions[2] as $tofetch) {
+ $todownload = substr(strrchr($tofetch, '-'), 1);
+ $static_text .= $todownload;
+ update_output_window($static_text . " ");
+ $base_filename="pfSense-base-{$todownload}.tgz";
+ download_file_with_progress_bar("http://www.pfSense.com/updates/{$kernel_filename}", "/tmp/{$base_filename}");
+ if($i == count($versions[2]) -1) {
+ $static_text .= ".\n";
+ } else {
+ $static_text .= ", ";
+ }
+ update_output_window($static_text);
+ $i++;
+ }
}
/* launch external upgrade helper */
OpenPOWER on IntegriCloud