From d45bbb9deaba18e1232067355f9b383bb9557b19 Mon Sep 17 00:00:00 2001 From: Darryl Quinn Date: Tue, 14 Jun 2016 13:25:05 -0500 Subject: [PATCH] fixes AREDN->ticket:172 Change-Id: I0db2dbc14283c2458a55b4e75ca25ce95d867b5b --- files/www/cgi-bin/sysinfo.json | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/files/www/cgi-bin/sysinfo.json b/files/www/cgi-bin/sysinfo.json index b44a2ece..98dabb7a 100755 --- a/files/www/cgi-bin/sysinfo.json +++ b/files/www/cgi-bin/sysinfo.json @@ -145,27 +145,13 @@ print "]"; if($parms{"hosts"} ) { - # Get a list of services, so we can remove them from the host list - foreach(`cat /var/run/services_olsr`) - { - $line = $_; - if ($line =~ /http:\/\/(.*):([0-9]*)\/.*$/ ) - { - if ( $2 > 0 ) # don't filter nodes with a gateway attached - { - $services{$1} = 1; - } - } - } - print ",\"hosts\":["; $mystr=""; foreach(`cat /var/run/hosts_olsr`) { $line = $_; next unless /^(\d+\.\d+\.\d+\.\d+)\s*(\S+)/; - if ( not $services{$2} and $line !~ /dtdlink|mid1\./ ) { - #if ( not $services{$2} and $line !~ /dtdlink/ ) { + if ($line !~ /dtdlink|mid[0-9]+\./ ) { $mystr .= sprintf "{\"name\":\"%s\",\"ip\":\"%s\"},",$2,$1; } }