From 19f66469aaf12e26b3a5da416a5f4251c7050f9f Mon Sep 17 00:00:00 2001 From: robiscool Date: Fri, 27 Aug 2010 07:35:47 -0700 Subject: snort, move barnyard2 install to postinstall --- config/snort/snort.inc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'config/snort') diff --git a/config/snort/snort.inc b/config/snort/snort.inc index 7bb10005..b5f93472 100644 --- a/config/snort/snort.inc +++ b/config/snort/snort.inc @@ -494,9 +494,27 @@ function post_delete_logs() function snort_postinstall() { - global $config, $pfsense_stable, $snort_arch; + global $config; conf_mount_rw(); +/* find out if were in 1.2.3-RELEASE */ +$pfsense_ver_chk = exec('/bin/cat /etc/version'); +if ($pfsense_ver_chk == '1.2.3-RELEASE') +{ + $pfsense_stable = 'yes'; +}else{ + $pfsense_stable = 'no'; +} + +/* find out what arch where in x86 , x64 */ +$snort_arch_ck = ''; +exec('/usr/bin/uname -m', $snort_arch_ck); +if($snort_arch_ck[0] == 'i386') { + $snort_arch = 'x86'; +}else{ + $snort_arch = 'x64'; +} + /* snort -> advanced features */ $bpfbufsize = $config['installedpackages']['snortglobal']['bpfbufsize']; $bpfmaxbufsize = $config['installedpackages']['snortglobal']['bpfmaxbufsize']; -- cgit v1.2.3