diff options
author | Ermal <eri@pfsense.org> | 2011-02-12 18:34:32 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-02-12 18:34:32 +0000 |
commit | bd2b98c9b0800522919a69bfff519c0934f2bb8e (patch) | |
tree | 45fb972074b72a2b84d8819e4939d5fd2239c09e /usr | |
parent | 5ee6a4571f33832202fe181821aab0f33a1b6d88 (diff) | |
download | pfsense-bd2b98c9b0800522919a69bfff519c0934f2bb8e.zip pfsense-bd2b98c9b0800522919a69bfff519c0934f2bb8e.tar.gz |
Remove any previous file with the same name as the one that will be downloaded. This avoid the gui to always show update availble even though the site could not be reached.
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/system_firmware_auto.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr/local/www/system_firmware_auto.php b/usr/local/www/system_firmware_auto.php index 06a9eb1..2daa6a2 100755 --- a/usr/local/www/system_firmware_auto.php +++ b/usr/local/www/system_firmware_auto.php @@ -136,6 +136,7 @@ if ($g['platform'] == "nanobsd") { $nanosize .= strtolower(trim(file_get_contents("/etc/nanosize.txt"))); } +@unlink("/tmp/{$g['product_name']}_version"); 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) { |