summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-11-13 14:32:20 -0200
committerRenato Botelho <renato@netgate.com>2015-11-13 14:32:20 -0200
commit7a8ed6ee7c8bc114c26c65dc20e59d9f307a6b8e (patch)
treeb7e581abbab048ccf8eabffb8d9f42179ef3b576
parentdf263538fa2d45c700ec6837a64038d2fc968102 (diff)
downloadpfsense-7a8ed6ee7c8bc114c26c65dc20e59d9f307a6b8e.zip
pfsense-7a8ed6ee7c8bc114c26c65dc20e59d9f307a6b8e.tar.gz
Consider broken packages on widget
-rw-r--r--src/usr/local/www/widgets/widgets/installed_packages.widget.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/usr/local/www/widgets/widgets/installed_packages.widget.php b/src/usr/local/www/widgets/widgets/installed_packages.widget.php
index 48164c5..125aeb7 100644
--- a/src/usr/local/www/widgets/widgets/installed_packages.widget.php
+++ b/src/usr/local/www/widgets/widgets/installed_packages.widget.php
@@ -68,7 +68,7 @@ require_once("pkg-utils.inc");
$package_list = get_pkg_info();
$installed_packages = array_filter($package_list, function($v) {
- return isset($v['installed']);
+ return (isset($v['installed']) || isset($v['broken']));
});
if (empty($installed_packages)): ?>
@@ -99,8 +99,13 @@ foreach ($installed_packages as $pkg):
$txtcolor = "black";
$upgradeavail = false;
$vergetstr = "";
+ $missing = false;
- if (isset($pkg['installed_version']) && isset($pkg['version'])) {
+ if (isset($pkg['broken'])) {
+ $txtcolor = "red";
+ $missing = true;
+ $status = 'Package is configured, but not installed!';
+ } else if (isset($pkg['installed_version']) && isset($pkg['version'])) {
$version_compare = pkg_version_compare(
$pkg['installed_version'], $pkg['version']);
if ($version_compare == '>') {
OpenPOWER on IntegriCloud