From 261c7de869eccca07c7d3f5ff331d28f88b2fde0 Mon Sep 17 00:00:00 2001 From: jim-p Date: Mon, 24 Jan 2011 14:34:44 -0500 Subject: 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 ) --- usr/local/www/fbegin.inc | 5 +++++ usr/local/www/pkg_mgr.php | 13 +++++++++++++ usr/local/www/pkg_mgr_installed.php | 13 +++++++++++++ 3 files changed, 31 insertions(+) (limited to 'usr') diff --git a/usr/local/www/fbegin.inc b/usr/local/www/fbegin.inc index b290899..6efb7a6 100755 --- a/usr/local/www/fbegin.inc +++ b/usr/local/www/fbegin.inc @@ -425,5 +425,10 @@ function add_to_menu($url, $name) {
Do not make changes in the GUI until this is complete.") . "

"); +} $pgtitle_output = true; ?> diff --git a/usr/local/www/pkg_mgr.php b/usr/local/www/pkg_mgr.php index 3c1ba89..15097a6 100755 --- a/usr/local/www/pkg_mgr.php +++ b/usr/local/www/pkg_mgr.php @@ -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 "\n"; + include("fbegin.inc"); + echo "Please wait while packages are reinstalled in the background."; + include("fend.inc"); + echo ""; + echo ""; + 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"); diff --git a/usr/local/www/pkg_mgr_installed.php b/usr/local/www/pkg_mgr_installed.php index 48c9677..02fb8d3 100755 --- a/usr/local/www/pkg_mgr_installed.php +++ b/usr/local/www/pkg_mgr_installed.php @@ -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 "\n"; + include("fbegin.inc"); + echo "Please wait while packages are reinstalled in the background."; + include("fend.inc"); + echo ""; + echo ""; + exit; +} + if(is_array($config['installedpackages']['package'])) { foreach($config['installedpackages']['package'] as $instpkg) { $tocheck[] = $instpkg['name']; -- cgit v1.1