From c542b8da9c40285148dad1c1060af23b8cb202a0 Mon Sep 17 00:00:00 2001 From: mxi1 Date: Thu, 26 Nov 2009 07:32:07 +0000 Subject: [PATCH] web_lscondition, lsresponse, lscondresp are changed git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4673 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/web.pm | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/web.pm b/xCAT-server/lib/xcat/plugins/web.pm index c68b7cd16..81759cad3 100644 --- a/xCAT-server/lib/xcat/plugins/web.pm +++ b/xCAT-server/lib/xcat/plugins/web.pm @@ -176,20 +176,14 @@ sub web_stopcondresp { sub web_lscond { my ($request, $callback, $sub_req) = @_; my $ret = `lscondition`; - my @conds; my @lines = split '\n', $ret; shift @lines; shift @lines; foreach my $line (@lines) { - # - my $index = index($line, '"', 1); - push @conds, substr($line, 1, $index-1); + $callback->({data=>$line}); } - #all the conditions are stored in @conds - my $data = join("=",@conds); - $callback->({data=>"$data"}); } sub web_lsresp { @@ -202,12 +196,8 @@ sub web_lsresp { shift @lines; foreach my $line (@lines) { - my $index = index($line, '"', 1); - push @resps, substr($line, 1, $index-1); + $callback->({data=>$line}); } - #all the responses are stored in @resps - my $data = join("=",@resps); - $callback->({data=>"$data"}); } sub web_lscondresp { @@ -216,16 +206,10 @@ sub web_lscondresp { shift @ret; shift @ret; - my $data; - foreach my $line (@ret) { chomp $line; - $data .=$line; - $data .="="; + $callback->({data=>$line}); } - - $callback->({data=>"$data"}); - } # currently, web_chtab only handle chtab for the table "monitoring" sub web_chtab {