aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-04-24 09:59:58 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-04-24 09:59:58 -0300
commit60d3c539241204940abd70dd0ff84b56708dd25a (patch)
tree197ec3b440b90d506ef16c040b9333e521a95a5e
parent9ef01b709e3779e344e8387dfd7a90f21b5ff922 (diff)
downloadpfsense-packages-60d3c539241204940abd70dd0ff84b56708dd25a.tar.gz
pfsense-packages-60d3c539241204940abd70dd0ff84b56708dd25a.tar.bz2
pfsense-packages-60d3c539241204940abd70dd0ff84b56708dd25a.zip
2.3+ won't use PBI anymore
-rw-r--r--config/snort/snort_defs.inc9
1 files changed, 7 insertions, 2 deletions
diff --git a/config/snort/snort_defs.inc b/config/snort/snort_defs.inc
index 906dd465..912fa3d3 100644
--- a/config/snort/snort_defs.inc
+++ b/config/snort/snort_defs.inc
@@ -34,8 +34,13 @@
global $g, $config;
/* Define some useful constants for Snort */
-if (!defined("SNORT_PBI_BASEDIR"))
- define("SNORT_PBI_BASEDIR", "/usr/pbi/snort-" . php_uname("m") . "/");
+if (!defined("SNORT_PBI_BASEDIR")) {
+ $pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
+ if ($pf_version == "2.1" || $pf_version == "2.2")
+ define("SNORT_PBI_BASEDIR", "/usr/pbi/snort-" . php_uname("m") . "/");
+ else
+ define("SNORT_PBI_BASEDIR", "/usr/local/");
+}
if (!defined("SNORT_PBI_BINDIR"))
define("SNORT_PBI_BINDIR", SNORT_PBI_BASEDIR . "bin/");
if (!defined("SNORTDIR"))