summaryrefslogtreecommitdiffstats
path: root/etc/inc/pkg-utils.inc
diff options
context:
space:
mode:
authorVinicius Coque <vinicius.coque@bluepex.com>2011-09-30 22:45:54 -0300
committerVinicius Coque <vinicius.coque@bluepex.com>2011-09-30 22:47:09 -0300
commit169f15744a589f9719d830ec9d9ff07cf622fc8f (patch)
tree7a073cc5149e6019fcba94a3b787418ad8671dac /etc/inc/pkg-utils.inc
parent9b1b25ee04af27e9eeedc106940316a90129e76c (diff)
downloadpfsense-169f15744a589f9719d830ec9d9ff07cf622fc8f.zip
pfsense-169f15744a589f9719d830ec9d9ff07cf622fc8f.tar.gz
Create symlinks for packages config files into the PBI directory
Diffstat (limited to 'etc/inc/pkg-utils.inc')
-rw-r--r--etc/inc/pkg-utils.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index ee1d1c8..8f6543b 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -780,6 +780,18 @@ function install_package_xml($pkg) {
if($pkg_config['custom_php_install_command']) {
$static_output .= gettext("Executing custom_php_install_command()...");
update_output_window($static_output);
+ /* XXX: create symlinks for conf files into the PBI directories.
+ * change packages to store configs at /usr/pbi/pkg/etc and remove this
+ */
+ eval_once($pkg_config['custom_php_install_command']);
+ exec("/usr/local/sbin/pbi_info | grep {$pkg} | xargs /usr/local/sbin/pbi_info | awk '/Prefix/ {print $2}'",$pbidir);
+ $pbidir = $pbidir[0];
+ exec("find /usr/local/etc/ -name *.conf | grep {$pkg}",$files);
+ foreach($files as $f) {
+ $pbiconf = str_replace('/usr/local',$pbidir,$f);
+ unlink($pbiconf);
+ symlink($f,$pbiconf);
+ }
eval_once($pkg_config['custom_php_install_command']);
$static_output .= gettext("done.") . "\n";
update_output_window($static_output);
OpenPOWER on IntegriCloud