aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-08-27 03:43:47 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-08-27 03:43:47 +0000
commit62460d788333528a5b6e80e6c87301b25aeac257 (patch)
tree52f370b6ef58c79f2271889d34d5f56e465576fe
parenta9b18c380b2e67a4ce6fe1e28811d25160596f2e (diff)
downloadpfsense-packages-62460d788333528a5b6e80e6c87301b25aeac257.tar.gz
pfsense-packages-62460d788333528a5b6e80e6c87301b25aeac257.tar.bz2
pfsense-packages-62460d788333528a5b6e80e6c87301b25aeac257.zip
Correctly handle new interfaces selection when its an array.
Ticket #412
-rw-r--r--packages/ntop/ntop.xml20
1 files changed, 12 insertions, 8 deletions
diff --git a/packages/ntop/ntop.xml b/packages/ntop/ntop.xml
index 267dc4b0..a398a4f8 100644
--- a/packages/ntop/ntop.xml
+++ b/packages/ntop/ntop.xml
@@ -51,8 +51,10 @@
</field>
<field>
<fielddescr>Interface</fielddescr>
- <fieldname>iface</fieldname>
+ <fieldname>interface_array</fieldname>
<value>lan</value>
+ <multiple>true</multiple>
+ <size>3</size>
<type>interfaces_selection</type>
</field>
</fields>
@@ -64,16 +66,18 @@
global $input_errors;
$ntop_config =&amp; $_POST;
$if_final = "";
+ $ifaces_final = "";
if($ntop_config['password'] and $ntop_config['passwordagain']) {
if($ntop_config['password'] == $ntop_config['passwordagain']) {
- $ifaces = $ntop_config['iface'];
- $lan = $config['interfaces']['lan']['if'];
- $if_final .= convert_friendly_interface_to_real_interface_name($if);
- if(!$if_final) {
- $if_final = $lan;
- }
+ foreach($_POST['interface_array'] as $iface) {
+ $if = convert_friendly_interface_to_real_interface_name($iface);
+ echo $if;
+ if($if) {
+ $ifaces_final .= $if . " ";
+ }
+ }
exec("/usr/local/bin/ntop --set-admin-password=" . $_POST['password'] . " &amp;", $ntopout);
- $start = "/usr/local/bin/ntop -i " . $if_final . " -u root -d --ipv4 -M -x 8102 -X 8192 &amp;";
+ $start = "/usr/local/bin/ntop -i " . $ifaces_final . " -u root -d --ipv4 -M -x 8102 -X 8192 &amp;";
write_rcfile(array(
"file" => "ntop.sh",
"start" => $start,