aboutsummaryrefslogtreecommitdiffstats
path: root/packages/dspam/pkg/dspam-pkgfunc.inc
diff options
context:
space:
mode:
authorDaniel Stefan Haischt <dsh@pfsense.org>2006-07-21 03:09:14 +0000
committerDaniel Stefan Haischt <dsh@pfsense.org>2006-07-21 03:09:14 +0000
commit5e36478d54db9e8179e976e94cfd7a8b06569aba (patch)
treeac291eb8028e6716ba37a40b7abf782d9c6101a1 /packages/dspam/pkg/dspam-pkgfunc.inc
parentea4109283337fc5fad8d5f9aeaac658d510d95a0 (diff)
downloadpfsense-packages-5e36478d54db9e8179e976e94cfd7a8b06569aba.tar.gz
pfsense-packages-5e36478d54db9e8179e976e94cfd7a8b06569aba.tar.bz2
pfsense-packages-5e36478d54db9e8179e976e94cfd7a8b06569aba.zip
- added some extra checks to be able to detect whether a particular software is available.
Diffstat (limited to 'packages/dspam/pkg/dspam-pkgfunc.inc')
-rw-r--r--packages/dspam/pkg/dspam-pkgfunc.inc53
1 files changed, 53 insertions, 0 deletions
diff --git a/packages/dspam/pkg/dspam-pkgfunc.inc b/packages/dspam/pkg/dspam-pkgfunc.inc
index 9f02669e..0ea5ba85 100644
--- a/packages/dspam/pkg/dspam-pkgfunc.inc
+++ b/packages/dspam/pkg/dspam-pkgfunc.inc
@@ -490,4 +490,57 @@ function custom_php_deinstall_command() {
conf_mount_ro();
}
+function checkForLDAPSupport() {
+ $pd = popen("ldd /usr/local/bin/dspam", "r");
+ while (!feof($pd)) {
+ $dspamstr .= fgets($pd, 4096);
+ }
+ pclose($pd);
+
+ if (strpos($dspamstr, "libldap") !== false &&
+ file_exists("/usr/local/lib/libldap.so") &&
+ file_exists("/usr/local/lib/liblber.so")) {
+ return true;
+ }
+
+ return false;
+}
+
+function checkForPgSQLSupport() {
+ if (file_exists("/usr/local/lib/libpgsql_drv.so") &&
+ file_exists("/usr/local/lib/libpq.so")) {
+ return true;
+ }
+
+ return false;
+}
+
+function checkForMySQLSupport() {
+ if (file_exists("/usr/local/lib/libmysql_drv.so") &&
+ file_exists("/usr/local/lib/mysql/libmysqlclient.so")) {
+ return true;
+ }
+
+ return false;
+}
+
+function checkForSQLiteSupport() {
+ if (file_exists("/usr/local/lib/libsqlite3_drv.so") &&
+ file_exists("/usr/local/lib/mysql/libsqlite3.so")) {
+ return true;
+ }
+
+ return false;
+}
+
+function checkForClamAVSupport() {
+ if (file_exists("/usr/local/bin/clamdscan") &&
+ file_exists("/usr/local/bin/clamscan") &&
+ file_exists("/usr/local/sbin/clamd")) {
+ return true;
+ }
+
+ return false;
+}
+
?>