summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-02-07 16:56:22 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-02-07 16:56:22 +0000
commit3e155fab442ea22d4e4fee1c841013cc25e2b356 (patch)
tree7be2c7d41820e7c0effd079a2578bf6c43197741 /etc
parent4c72d762ebb6bc5c23352a6151696dadc0d4b1de (diff)
downloadpfsense-3e155fab442ea22d4e4fee1c841013cc25e2b356.zip
pfsense-3e155fab442ea22d4e4fee1c841013cc25e2b356.tar.gz
Handle include files correctly
Ticket #1250
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pkg-utils.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index 1ebfcbb..748497e 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -176,7 +176,7 @@ function get_pkg_depends($pkg_name, $filetype = ".xml", $format = "files", $retu
} else {
$prefix = "/usr/local/pkg/";
}
- if(!file_exists($prefix . $pkg_name))
+ if(!file_exists($prefix . $depend_file))
log_error("The {$package['name']} package is missing required dependencies and must be reinstalled.");
switch ($format) {
case "files":
@@ -241,10 +241,10 @@ function sync_package($pkg_name, $sync_depends = true, $show_message = false) {
/* Bring in package include files */
if (isset($pkg_config['include_file']) && $pkg_config['include_file'] != "") {
$include_file = $pkg_config['include_file'];
- if (file_exists('/usr/local/pkg/' . $include_file))
- require_once('/usr/local/pkg/' . $include_file);
+ if (file_exists($include_file))
+ require_once($include_file);
else
- if (file_exists('/usr/local/pkg/' . $include_file)) {
+ if (file_exists($include_file)) {
require_once($include_file);
} else {
log_error("Could not locate {$include_file}.");
@@ -915,4 +915,4 @@ function squash_from_bytes($size, $round = "") {
}
return;
}
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud