mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Warn users a different way if packages are being reinstalled in the background. Only lock out package pages, still print a giant warning on the others. (Some people were getting stuck in this state http://forum.pfsense.org/index.php/topic,32531.0.html )
This commit is contained in:
parent
8633930d11
commit
261c7de869
@ -385,9 +385,9 @@ if(file_exists('/conf/needs_package_sync')) {
|
||||
if($config['installedpackages'] <> '' && is_array($config['installedpackages']['package'])) {
|
||||
require_once("pkg-utils.inc");
|
||||
if($g['platform'] == "pfSense" || $g['platform'] == "nanobsd") {
|
||||
mark_subsystem_dirty('firmwarelock');
|
||||
mark_subsystem_dirty('packagelock');
|
||||
pkg_reinstall_all();
|
||||
clear_subsystem_dirty('firmwarelock');
|
||||
clear_subsystem_dirty('packagelock');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -425,5 +425,10 @@ function add_to_menu($url, $name) {
|
||||
<br />
|
||||
|
||||
<?php
|
||||
/* if upgrade in progress, alert user */
|
||||
if(is_subsystem_dirty('packagelock')) {
|
||||
$pgtitle = array(gettext("System"),gettext("Package Manager"));
|
||||
print_info_box(gettext("Packages are currently being reinstalled in the background.<p>Do not make changes in the GUI until this is complete.") . "<p><img src='/themes/{$g['theme']}/images/icons/icon_fw-update.gif'>");
|
||||
}
|
||||
$pgtitle_output = true;
|
||||
?>
|
||||
|
||||
@ -44,6 +44,19 @@ require_once("globals.inc");
|
||||
require_once("guiconfig.inc");
|
||||
require_once("pkg-utils.inc");
|
||||
|
||||
/* if upgrade in progress, alert user */
|
||||
if(is_subsystem_dirty('packagelock')) {
|
||||
$pgtitle = array(gettext("System"),gettext("Package Manager"));
|
||||
include("head.inc");
|
||||
echo "<body link=\"#0000CC\" vlink=\"#0000CC\" alink=\"#0000CC\">\n";
|
||||
include("fbegin.inc");
|
||||
echo "Please wait while packages are reinstalled in the background.";
|
||||
include("fend.inc");
|
||||
echo "</body>";
|
||||
echo "</html>";
|
||||
exit;
|
||||
}
|
||||
|
||||
$pkg_info = get_pkg_info('all', array("noembedded", "name", "category", "website", "version", "status", "descr", "maintainer", "required_version", "maximum_version", "pkginfolink", "supportedbybsdperimeter"));
|
||||
if($pkg_info) {
|
||||
$fout = fopen("{$g['tmp_path']}/pkg_info.cache", "w");
|
||||
|
||||
@ -40,6 +40,19 @@
|
||||
require_once("guiconfig.inc");
|
||||
require_once("pkg-utils.inc");
|
||||
|
||||
/* if upgrade in progress, alert user */
|
||||
if(is_subsystem_dirty('packagelock')) {
|
||||
$pgtitle = array(gettext("System"),gettext("Package Manager"));
|
||||
include("head.inc");
|
||||
echo "<body link=\"#0000CC\" vlink=\"#0000CC\" alink=\"#0000CC\">\n";
|
||||
include("fbegin.inc");
|
||||
echo "Please wait while packages are reinstalled in the background.";
|
||||
include("fend.inc");
|
||||
echo "</body>";
|
||||
echo "</html>";
|
||||
exit;
|
||||
}
|
||||
|
||||
if(is_array($config['installedpackages']['package'])) {
|
||||
foreach($config['installedpackages']['package'] as $instpkg) {
|
||||
$tocheck[] = $instpkg['name'];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user