From bed3d4112820644be2105b568edf96ad7328c422 Mon Sep 17 00:00:00 2001 From: andywray Date: Thu, 13 Jan 2011 19:50:50 +0000 Subject: [PATCH] Add -n switch to xcoll to show output as nodenames instead of groupnames. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8643 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/xcoll | 10 +++++++++- xCAT-client/pods/man1/xcoll.1.pod | 9 ++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/xCAT-client/bin/xcoll b/xCAT-client/bin/xcoll index 70f85ce75..f720b0062 100755 --- a/xCAT-client/bin/xcoll +++ b/xCAT-client/bin/xcoll @@ -4,8 +4,14 @@ BEGIN { $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : -d '/opt/xcat' ? '/o use lib "$::XCATROOT/lib/perl"; use Data::Dumper; use xCAT::Client; +use Getopt:Long; use strict; my %output; + +my $option; + +GetOptions("n"=>\$option); + while () { my $node; my $output; @@ -36,7 +42,9 @@ foreach my $output (keys %collated) { noderange => [$nodes], command => ['rnoderange'], }; - xCAT::Client::submit_request($cmdref,\&fillerup); + unless ($option) { + xCAT::Client::submit_request($cmdref,\&fillerup); + } print "====================================\n"; print "$nodes\n"; print "====================================\n"; diff --git a/xCAT-client/pods/man1/xcoll.1.pod b/xCAT-client/pods/man1/xcoll.1.pod index f0f4461b4..520d595e6 100644 --- a/xCAT-client/pods/man1/xcoll.1.pod +++ b/xCAT-client/pods/man1/xcoll.1.pod @@ -4,7 +4,7 @@ B - Formats and consolidates the output of the B, B commands. =head1 B -B +B [B<-n>] =head1 B @@ -44,6 +44,13 @@ is identical: . . +=head1 B + +=over 3 + +=item B<-n> + +Display output as nodenames instead of groupnames. =head1 B