diff options
author | Renato Botelho <garga@FreeBSD.org> | 2015-04-30 16:35:23 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-04-30 16:35:23 -0300 |
commit | ec2785f6827e3ab4f7dc8d226d91b00dfb5ddf0e (patch) | |
tree | 54f46ffc68469ed38767176a5cc48a2e26b4ce18 /config/suricata | |
parent | f12f4b99f7af50e6eb813fe6fe295c13e6ac5702 (diff) | |
download | pfsense-packages-ec2785f6827e3ab4f7dc8d226d91b00dfb5ddf0e.tar.gz pfsense-packages-ec2785f6827e3ab4f7dc8d226d91b00dfb5ddf0e.tar.bz2 pfsense-packages-ec2785f6827e3ab4f7dc8d226d91b00dfb5ddf0e.zip |
Fix suricata pbi detection for 2.3+
Diffstat (limited to 'config/suricata')
-rw-r--r-- | config/suricata/suricata_defs.inc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/config/suricata/suricata_defs.inc b/config/suricata/suricata_defs.inc index 7758a9f0..5467f88c 100644 --- a/config/suricata/suricata_defs.inc +++ b/config/suricata/suricata_defs.inc @@ -58,9 +58,14 @@ $suricata_package_version = "Suricata {$config['installedpackages']['package'][g if (!defined('SURICATA_PKG_VER')) define('SURICATA_PKG_VER', $suricata_package_version); +$pf_version=substr(trim(file_get_contents("/etc/version")),0,3); // Define the PBI base directory -if (!defined('SURICATA_PBI_BASEDIR')) - define('SURICATA_PBI_BASEDIR', '/usr/pbi/suricata-' . php_uname("m") . '/'); +if (!defined('SURICATA_PBI_BASEDIR')) { + if ($pf_version == "2.1" || $pf_version == "2.2") + define('SURICATA_PBI_BASEDIR', '/usr/pbi/suricata-' . php_uname("m") . '/'); + else + define('SURICATA_PBI_BASEDIR', '/usr/local/'); +} // Define the PBI binary wrapper directory if (!defined('SURICATA_PBI_BINDIR')) |