summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_firmware_auto.php
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 /usr/local/www/system_firmware_auto.php
parent4f0606164f7d257a270070b9de83db8d2e510ca7 (diff)
downloadpfsense-414053da6935d6f8927e18befe17dfa3847c3720.zip
pfsense-414053da6935d6f8927e18befe17dfa3847c3720.tar.gz
Fix NanoBSD automatic update checks.
Diffstat (limited to 'usr/local/www/system_firmware_auto.php')
-rwxr-xr-xusr/local/www/system_firmware_auto.php12
1 files changed, 9 insertions, 3 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 {
OpenPOWER on IntegriCloud