diff options
author | Steve Beaver <sbeaver@netgate.com> | 2016-12-02 08:10:02 -0500 |
---|---|---|
committer | Steve Beaver <sbeaver@netgate.com> | 2016-12-02 08:10:38 -0500 |
commit | c73a2f3134db01c7a516f6dc66dce24c822667c4 (patch) | |
tree | a48eae8fdf0dc76bff7fc014904a2305f4f0f8a1 /src/usr/local/www/pkg_mgr_install.php | |
parent | ad477ffafc4491ccc7a9c69686cfdb404e6a7bca (diff) | |
download | pfsense-c73a2f3134db01c7a516f6dc66dce24c822667c4.zip pfsense-c73a2f3134db01c7a516f6dc66dce24c822667c4.tar.gz |
Revise status messages. Adjust PID file timeout to accommodate slower systems
Diffstat (limited to 'src/usr/local/www/pkg_mgr_install.php')
-rw-r--r-- | src/usr/local/www/pkg_mgr_install.php | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/usr/local/www/pkg_mgr_install.php b/src/usr/local/www/pkg_mgr_install.php index 60d9305..f0ef8e9 100644 --- a/src/usr/local/www/pkg_mgr_install.php +++ b/src/usr/local/www/pkg_mgr_install.php @@ -77,16 +77,17 @@ if ($_REQUEST['ajax']) { // When we do a reinstallall, it is technically possible that we might catch the system in-between // packages, hence the de-bounce here + for ($idx=0;$idx<5 && !isvalidpid($pidfile); $idx++) { + usleep(200000); + } + if (!isvalidpid($pidfile)) { - usleep(400000); - if (!isvalidpid($pidfile)) { - $running = "stopped"; - // The log files may not be complete when the process terminates so we need wait until we see the - // exit status (__RC=x) - waitfor_string_in_file($_REQUEST['logfilename'] . '.txt', "__RC=", 10); - filter_configure(); - send_event("service restart packages"); - } + $running = "stopped"; + // The log files may not be complete when the process terminates so we need wait until we see the + // exit status (__RC=x) + waitfor_string_in_file($_REQUEST['logfilename'] . '.txt', "__RC=", 10); + filter_configure(); + send_event("service restart packages"); } $pidarray = array('pid' => $running); @@ -425,7 +426,7 @@ if ($confirmed): </div> <div class="panel-body"> - <textarea rows="15" class="form-control" id="output" name="output"><?=$_POST['output']?></textarea> + <textarea rows="15" class="form-control" id="output" name="output"><?=($completed ? $_POST['output'] : gettext("Please wait while the update system initializes"))?></textarea> </div> </div> <?php @@ -548,7 +549,7 @@ function show_info() { $('#final').addClass("alert-info"); if ("<?=$pkgmode?>" != "reinstallall") { $('#final').html("<p><?=$pkg_wait_txt?>" + "</p><p>" + - "<?=gettext("This may take several minutes!")?>" + "</p>"); + "<?=gettext("This may take several minutes. Do not leave or refresh the page!")?>" + "</p>"); } else { $('#final').html("<p><?=gettext('Please wait while the reinstallation of all packages completes.')?>" + "</p><p>" + "<?=gettext("This may take several minutes!")?>" + "</p>"); |