From 301c0c2d6848c5d9e7a39d1a4dc1be497185e925 Mon Sep 17 00:00:00 2001 From: Colin Smith Date: Sun, 24 Jul 2005 19:50:10 +0000 Subject: Repair ntop package. XXX: We need to allow packages to throw input_error style messages. The config isn't changed if these errors exist, but the function to display isn't called. --- packages/ntop/ntop.xml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'packages') diff --git a/packages/ntop/ntop.xml b/packages/ntop/ntop.xml index 0a8fc5bd..161f26af 100644 --- a/packages/ntop/ntop.xml +++ b/packages/ntop/ntop.xml @@ -3,7 +3,6 @@ Diagnostics: ntop Settings ntop 3.0 - yes Change pkg_edit.php?xml=ntop.xml&id=0 @@ -53,8 +52,6 @@ Interface iface - 3 - true lan interfaces_selection @@ -65,22 +62,17 @@ config_lock(); global $config; global $input_errors; - $ntop_config =& $config['installedpackages']['ntop']['config'][0]; + $ntop_config =& $_POST; $if_final = ""; if($ntop_config['password'] and $ntop_config['passwordagain']) { if($ntop_config['password'] == $ntop_config['passwordagain']) { $ifaces = $ntop_config['iface']; - $isfirst = 0; $lan = $config['interfaces']['lan']['if']; - foreach($ifaces as $if) { - if($isfirst == 1) $if_final = ","; - $if_final .= convert_friendly_interface_to_real_interface_name($if); - $isfirst = 1; - } + $if_final .= convert_friendly_interface_to_real_interface_name($if); if(!$if_final) { $if_final = $lan; } - system("/usr/local/bin/ntop --set-admin-password=" . $_POST['password'] . " &"); + exec("/usr/local/bin/ntop --set-admin-password=" . $_POST['password'] . " &", $ntopout); $start = "/usr/local/bin/ntop -i " . $if_final . " -u root -d --ipv4 -M -x 8102 -X 8192 &"; write_rcfile(array( "file" => "ntop.sh", -- cgit v1.2.3