summaryrefslogtreecommitdiffstats
path: root/etc/inc/pkg-utils.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-07-29 21:40:17 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-07-29 21:40:17 +0000
commit30e4c34a17f3c75490617af9ca2b5e4ad3987ae3 (patch)
treeedc212ed15931045ce1e84fb1d55042ced5e24b6 /etc/inc/pkg-utils.inc
parentca84833fcd9c08d5672fe069c9e3dd4778834f2d (diff)
downloadpfsense-30e4c34a17f3c75490617af9ca2b5e4ad3987ae3.zip
pfsense-30e4c34a17f3c75490617af9ca2b5e4ad3987ae3.tar.gz
MFC 13273
package include files need to be included for custom php commands to run in package resync
Diffstat (limited to 'etc/inc/pkg-utils.inc')
-rw-r--r--etc/inc/pkg-utils.inc11
1 files changed, 11 insertions, 0 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index d90274b..b17ece6 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -226,6 +226,17 @@ function sync_package($pkg_name, $sync_depends = true, $show_message = false) {
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);
} else {
$pkg_config = parse_xml_config_pkg("/usr/local/pkg/" . $package['configurationfile'], "packagegui");
+
+ /* 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);
+ else
+ require_once($include_file);
+ }
+
/* XXX: Zend complains about the next line "Wrong break depth"
* The code is obviously wrong, but I'm not sure what it's supposed to do?
*/
OpenPOWER on IntegriCloud