summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-03-03 11:54:10 -0300
committerRenato Botelho <renato@netgate.com>2017-03-06 15:34:25 -0300
commitaa4d720501721eb49aa7e2526eeeee86cc31dfbd (patch)
treebd9d4e91e4c9fb31407cab4724672c3852c9b58a
parentf751b20a6aadb5eed577334b9505b5b985883bcf (diff)
downloadpfsense-aa4d720501721eb49aa7e2526eeeee86cc31dfbd.zip
pfsense-aa4d720501721eb49aa7e2526eeeee86cc31dfbd.tar.gz
Deduplicate code
-rw-r--r--src/usr/local/www/pkg_mgr_install.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/usr/local/www/pkg_mgr_install.php b/src/usr/local/www/pkg_mgr_install.php
index 1ffad16..2e838bb 100644
--- a/src/usr/local/www/pkg_mgr_install.php
+++ b/src/usr/local/www/pkg_mgr_install.php
@@ -90,6 +90,7 @@ $guiretry = 20; // Seconds to try again if $guitimeout was not long enough
// Todo:
// Respect next_log_line and append log to output window rather than writing it
+$pidfile = $g['varrun_path'] . '/' . $g['product_name'] . '-upgrade.pid';
if ($_REQUEST['ajax']) {
$response = "";
@@ -104,7 +105,6 @@ if ($_REQUEST['ajax']) {
}
// Check to see if our process is still running
- $pidfile = $g['varrun_path'] . '/' . $g['product_name'] . '-upgrade.pid';
$running = "running";
// When we do a reinstallall, it is technically possible that we might catch the system in-between
@@ -433,7 +433,6 @@ if ($firmwareupdate) {
if ($confirmed):
// XXX: What if the user navigates away from this page and then comes back via his/her "Back" button?
- $pidfile = $g['varrun_path'] . '/' . $g['product_name'] . '-upgrade.pid';
if (isvalidpid($pidfile)) {
$start_polling = true;
OpenPOWER on IntegriCloud