From 4593069602bd09ae183f1052cc117e54066bfd0b Mon Sep 17 00:00:00 2001 From: jim-p Date: Sat, 23 Jun 2012 13:25:03 -0400 Subject: Setup library paths to include /usr/pbi/*/lib as a last resort to make sure things can find libraries. We may eventually replace this with a better method as this can lead to conflicts, but for now it will allow packages to find their proper libraries. --- etc/inc/util.inc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'etc/inc/util.inc') diff --git a/etc/inc/util.inc b/etc/inc/util.inc index 7737ad1..9d234a8 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -1815,4 +1815,13 @@ function array_exclude($needle, $haystack) { return $result; } +function setup_library_paths() { + $current_library_paths = explode(":", exec("/sbin/ldconfig -r | /usr/bin/grep 'search directories' | /usr/bin/awk '{print $3;}'")); + $pbi_library_paths = glob("/usr/pbi/*/lib"); + foreach ($pbi_library_paths as $pbilib) { + if (!in_array($pbilib, $current_library_paths)) + exec("/sbin/ldconfig -m {$pbilib}"); + } +} + ?> -- cgit v1.1