summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-04-21 00:58:54 +0000
committerColin Smith <colin@pfsense.org>2005-04-21 00:58:54 +0000
commit29f96f5ae47cf235034a00588642730d81a527f5 (patch)
treea43ad0ae7b8508b1ea2cbf686b17c3c879ee968e /usr/local/www
parent928db768cd97a2fb98ba7b2818149a595b6cc221 (diff)
downloadpfsense-29f96f5ae47cf235034a00588642730d81a527f5.zip
pfsense-29f96f5ae47cf235034a00588642730d81a527f5.tar.gz
(#15) Check to an rc.firmware_auto process instead of relying on a file.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/system_firmware_auto.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr/local/www/system_firmware_auto.php b/usr/local/www/system_firmware_auto.php
index 3730cb2..5d59c46 100755
--- a/usr/local/www/system_firmware_auto.php
+++ b/usr/local/www/system_firmware_auto.php
@@ -223,12 +223,12 @@ if($use_old_checkversion == false) {
$firmwareurl=$g['firmwarebaseurl'];
$firmwarename=$g['firmwarefilename'];
}
- if(file_exists("/tmp/auto_upgrade_in_progress")) {
- $update_status = "A upgrade is already in progress.";
+ exec("ps -ax | grep rc.firmware_auto | grep -v grep", $upgrade_lock);
+ if($upgrade_lock[0] != "") {
+ $update_status = "An upgrade is already in progress.";
update_output_window($update_status);
exit;
} else {
- touch("/tmp/auto_upgrade_in_progress");
log_error("Downloading http://www.pfSense.com/latest.tgz");
update_status("Downloading latest version...");
download_file_with_progress_bar("http://www.pfSense.com/latest.tgz", "/tmp/latest.tgz");
@@ -239,7 +239,6 @@ if($use_old_checkversion == false) {
update_status("pfSense is now upgrading. The firewall will reboot once the operation has completed.");
echo "\n<script language=\"JavaScript\">document.progressbar.style.visibility='hidden';\n</script>";
exit;
-
}
} elseif($versions == "") {
update_output_window("Using old checkversion method. You are running the latest version of pfSense.");
@@ -252,4 +251,4 @@ if($use_old_checkversion == false) {
echo "\n<script language=\"JavaScript\">document.progressbar.style.visibility='hidden';\n</script>";
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud