summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-02-06 20:25:48 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-02-06 20:25:48 +0000
commit3b3719806cdf953579802c8b99a18b6a622ddfb5 (patch)
tree96c611d1e4c056167871094b6abc09a87c94945e /etc
parentb4f778f16358041e206635aa0fa523278c286a88 (diff)
downloadpfsense-3b3719806cdf953579802c8b99a18b6a622ddfb5.zip
pfsense-3b3719806cdf953579802c8b99a18b6a622ddfb5.tar.gz
* Do not file a notice for missing package files. Simply log an error.
* Improve require_file handling
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pkg-utils.inc12
1 files changed, 7 insertions, 5 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index e082797..60b2495 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -159,7 +159,7 @@ function get_pkg_depends($pkg_name, $filetype = ".xml", $format = "files", $retu
}
$package = $config['installedpackages']['package'][$pkg_id];
if(!file_exists("/usr/local/pkg/" . $package['configurationfile'])) {
- file_notice($package['name'], "The {$package['name']} package is missing its configuration file and must be reinstalled.", "Packages", "/pkg_mgr_install.php?mode=reinstallpkg&pkg={$package['name']}", 1);
+ log_error("The {$package['name']} package is missing required dependencies and must be reinstalled.");
return;
}
$pkg_xml = parse_xml_config_pkg("/usr/local/pkg/" . $package['configurationfile'], "packagegui");
@@ -174,9 +174,8 @@ function get_pkg_depends($pkg_name, $filetype = ".xml", $format = "files", $retu
} else {
$prefix = "/usr/local/pkg/";
}
- if(!file_exists($prefix . $pkg_name)) {
- file_notice($package['name'], "The {$package['name']} package is missing required dependencies and must be reinstalled.", "Packages", "/pkg_mgr_install.php?mode=reinstallpkg&pkg={$package['name']}", 1);
- }
+ if(!file_exists($prefix . $pkg_name))
+ log_error("The {$package['name']} package is missing required dependencies and must be reinstalled.");
switch ($format) {
case "files":
$depends[] = $depend_file;
@@ -238,7 +237,10 @@ function sync_package($pkg_name, $sync_depends = true, $show_message = false) {
if (file_exists('/usr/local/pkg/' . $include_file))
require_once('/usr/local/pkg/' . $include_file);
else
- require_once($include_file);
+ if (file_exists($include_file))
+ require_once($include_file);
+ else
+ log_error("Could not locate {$include_file}.");
}
/* XXX: Zend complains about the next line "Wrong break depth"
OpenPOWER on IntegriCloud