aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Crane <mcrane@pfsense.org>2009-01-15 05:25:44 +0000
committerMark Crane <mcrane@pfsense.org>2009-01-15 05:25:44 +0000
commit83889b4292335641f9860e25ae4e58a3bf5f6d7c (patch)
tree1638b7b9194455819fc4183d333c9b4f78edf8fa
parent1eec3176440bf3c474c724ccce9178e35fff5f9e (diff)
downloadpfsense-packages-83889b4292335641f9860e25ae4e58a3bf5f6d7c.tar.gz
pfsense-packages-83889b4292335641f9860e25ae4e58a3bf5f6d7c.tar.bz2
pfsense-packages-83889b4292335641f9860e25ae4e58a3bf5f6d7c.zip
Snort package fix snort.sh start up script so that snort will start after reboot. Sponsored by username: miteltec
-rw-r--r--packages/snort/snort.inc51
-rw-r--r--packages/snort/snort.xml2
2 files changed, 24 insertions, 29 deletions
diff --git a/packages/snort/snort.inc b/packages/snort/snort.inc
index 0ae5460c..a8b16681 100644
--- a/packages/snort/snort.inc
+++ b/packages/snort/snort.inc
@@ -82,38 +82,33 @@ function sync_package_snort()
exec("/bin/rm -f /usr/local/etc/rc.d/snort");
$first = 0;
- $snortInterfaces = array(); /* -gtm */
-
- /* generate if list */
- $iflist = array("lan" => "LAN");
-
- for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++)
- $iflist['opt' . $i] = "opt{$i}";
-
- if($_POST['iface_array'])
- {
- foreach($_POST['iface_array'] as $iface)
- {
+ $snortInterfaces = array(); /* -gtm */
+
+ $if_list = $config['installedpackages']['snort']['config'][0]['iface_array'];
+ $if_array = split(',', $if_list);
+ //print_r($if_array);
+ if($if_array) {
+ foreach($if_array as $iface) {
$if = convert_friendly_interface_to_real_interface_name($iface);
-
- if($config['interfaces'][$iface]['ipaddr'] == "pppoe")
+
+ if($config['interfaces'][$iface]['ipaddr'] == "pppoe") {
$if = "ng0";
-
- /* build a list of user specified interfaces -gtm */
- if($if)
- {
- array_push($snortInterfaces, $if);
- $first = 1;
- }
+ }
+
+ /* build a list of user specified interfaces -gtm */
+ if($if){
+ array_push($snortInterfaces, $if);
+ $first = 1;
+ }
}
-
- if (count($snortInterfaces) < 1)
- {
- log_error("Snort will not start. You must select an interface for it to listen on.");
- return;
- }
-
+
+ if (count($snortInterfaces) < 1) {
+ //log_error("Snort will not start. You must select an interface for it to listen on.");
+ echo "Snort will not start. You must select an interface for it to listen on.";
+ return;
+ }
}
+ //print_r($snortInterfaces);
/* create log directory */
$start = "/bin/mkdir -p /var/log/snort";
diff --git a/packages/snort/snort.xml b/packages/snort/snort.xml
index 9fc85c4b..6ba362c0 100644
--- a/packages/snort/snort.xml
+++ b/packages/snort/snort.xml
@@ -46,7 +46,7 @@
<requirements>Describe your package requirements here</requirements>
<faq>Currently there are no FAQ items provided.</faq>
<name>Snort</name>
- <version>2.8.2.1</version>
+ <version>2.8.2.2</version>
<title>Services: Snort</title>
<include_file>/usr/local/pkg/snort.inc</include_file>
<menu>