aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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"))