From 66117158c2fde8351c36d44743ad0f13ad9003e5 Mon Sep 17 00:00:00 2001 From: yinle Date: Fri, 11 Feb 2011 06:18:52 +0000 Subject: [PATCH] fix bug 3177471:lsslp with -r (raw) flag displays duplicate entries git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8822 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/lsslp.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/lsslp.pm b/xCAT-server/lib/xcat/plugins/lsslp.pm index 4ef4579c9..85b53d620 100644 --- a/xCAT-server/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server/lib/xcat/plugins/lsslp.pm @@ -1155,10 +1155,18 @@ sub format_output { ########################################### # -r flag for raw response format ########################################### + my %rawhash = (); if ( exists( $opt{r} )) { foreach ( keys %$outhash ) { - $result .= "@{ $outhash->{$_}}[9]\n"; + #$result .= "@{ $outhash->{$_}}[9]\n"; + my $raw = @{$outhash->{$_}}[9]; + $rawhash{$raw} = 1; } + + foreach ( keys %rawhash ) { + $result .= "$_\n"; + } + send_msg( $request, 0, $result ); return; }