summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_firmware_auto.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-04-19 22:35:22 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-04-19 22:35:22 +0000
commite5e6120e64b7f2f51763aee09a956f3b65d507dd (patch)
tree6b5cf027214b5a5ad4dc39c26e416e46255d2196 /usr/local/www/system_firmware_auto.php
parent0d0a229428b4b02a78462d146fcd57e0adc4c85d (diff)
downloadpfsense-e5e6120e64b7f2f51763aee09a956f3b65d507dd.zip
pfsense-e5e6120e64b7f2f51763aee09a956f3b65d507dd.tar.gz
Do not allow auto upgrade to be invoked twice.
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 7c97782..980aba3 100755
--- a/usr/local/www/system_firmware_auto.php
+++ b/usr/local/www/system_firmware_auto.php
@@ -223,9 +223,15 @@ if($use_old_checkversion == false) {
$firmwareurl=$g['firmwarebaseurl'];
$firmwarename=$g['firmwarefilename'];
}
-
- exec_rc_script_async("/etc/rc.firmware_auto {$firmwareurl} {$firmwarename} {$http_auth_username} {$http_auth_password}");
- $update_status = "pfSense is now auto upgrading. The firewall will automatically reboot if it succeeds.";
+ if(file_exists("/tmp/auto_upgrade_in_progress")) {
+ $update_status = "A upgrade is already in progress.";
+ update_output_window($update_status);
+ exit;
+ } else {
+ touch("/tmp/auto_upgrade_in_progress");
+ exec_rc_script_async("/etc/rc.firmware_auto {$firmwareurl} {$firmwarename} {$http_auth_username} {$http_auth_password}");
+ $update_status = "pfSense is now auto upgrading. The firewall will automatically reboot if it succeeds.";
+ }
} elseif($versions == "") {
update_output_window("Using old checkversion method. You are running the latest version of pfSense.");
} elseif(is_null($versions)) {
OpenPOWER on IntegriCloud