summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-06-21 16:07:45 -0400
committerjim-p <jimp@pfsense.org>2010-06-21 16:08:26 -0400
commit414053da6935d6f8927e18befe17dfa3847c3720 (patch)
tree907fc43f3ab75753b14b02150c63104c27a03af8
parent4f0606164f7d257a270070b9de83db8d2e510ca7 (diff)
downloadpfsense-414053da6935d6f8927e18befe17dfa3847c3720.zip
pfsense-414053da6935d6f8927e18befe17dfa3847c3720.tar.gz
Fix NanoBSD automatic update checks.
-rwxr-xr-xusr/local/www/system_firmware_auto.php12
-rwxr-xr-xusr/local/www/system_firmware_check.php11
2 files changed, 19 insertions, 4 deletions
diff --git a/usr/local/www/system_firmware_auto.php b/usr/local/www/system_firmware_auto.php
index d5b7cd5..e18c681 100755
--- a/usr/local/www/system_firmware_auto.php
+++ b/usr/local/www/system_firmware_auto.php
@@ -124,7 +124,12 @@ include("head.inc");
<?php
update_status(gettext("Downloading current version information") . "...");
-download_file_with_progress_bar("{$updater_url}/version", "/tmp/{$g['product_name']}_version");
+$nanosize = "";
+if ($g['platform'] == "nanobsd") {
+ $nanosize = "-nanobsd-" . strtolower(trim(file_get_contents("/etc/nanosize.txt")));
+}
+
+download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version");
$latest_version = str_replace("\n", "", @file_get_contents("/tmp/{$g['product_name']}_version"));
if(!$latest_version) {
update_output_window(gettext("Unable to check for updates."));
@@ -143,8 +148,9 @@ if(!$latest_version) {
if (pfs_version_compare($current_installed_buildtime, $current_installed_version, $latest_version) == -1) {
update_status(gettext("Downloading updates") . "...");
conf_mount_rw();
- $status = download_file_with_progress_bar("{$updater_url}/latest.tgz", "{$g['upload_path']}/latest.tgz", "read_body_firmware");
- $status = download_file_with_progress_bar("{$updater_url}/latest.tgz.sha256", "{$g['upload_path']}/latest.tgz.sha256");
+
+ $status = download_file_with_progress_bar("{$updater_url}/latest{$nanosize}.tgz", "{$g['upload_path']}/latest.tgz", "read_body_firmware");
+ $status = download_file_with_progress_bar("{$updater_url}/latest{$nanosize}.tgz.sha256", "{$g['upload_path']}/latest.tgz.sha256");
conf_mount_ro();
update_output_window("{$g['product_name']} " . gettext("download complete."));
} else {
diff --git a/usr/local/www/system_firmware_check.php b/usr/local/www/system_firmware_check.php
index 9eabe26..c676950 100755
--- a/usr/local/www/system_firmware_check.php
+++ b/usr/local/www/system_firmware_check.php
@@ -120,7 +120,13 @@ else
$updater_url = $g['update_url'];
$needs_system_upgrade = false;
$static_text .= gettext("Downloading new version information...");
-download_file_with_progress_bar("{$updater_url}/version", "/tmp/{$g['product_name']}_version");
+
+$nanosize = "";
+if ($g['platform'] == "nanobsd") {
+ $nanosize = "-nanobsd-" . strtolower(trim(file_get_contents("/etc/nanosize.txt")));
+}
+
+download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version");
$remote_version = trim(@file_get_contents("/tmp/{$g['product_name']}_version"));
$static_text .= gettext("done") . "\\n";
if (!$remote_version) {
@@ -155,6 +161,9 @@ if ($needs_system_upgrade == false) {
echo "\n<script>$('invokeupgrade').style.visibility = 'visible';</script>";
$txt = gettext("A new version is now available") . "\\n\\n";
$txt .= gettext("Current version") .": ". $current_installed_version . "\\n";
+if ($g['platform'] == "nanobsd") {
+ $txt .= " " . gettext("NanoBSD Size") . " : " . trim(file_get_contents("/etc/nanosize.txt")) . "\\n";
+}
$txt .= " " . gettext("Built On") .": ". $current_installed_buildtime . "\\n";
$txt .= " " . gettext("New version") .": ". $remote_version . "\\n\\n";
$txt .= " " . gettext("Update source") .": ". $updater_url . "\\n";
OpenPOWER on IntegriCloud