Allow reventlog -f clear for forcing blade clear

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9771 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2011-06-09 15:05:44 +00:00
parent 529a5b31f8
commit 8ece9f098d

View File

@ -328,7 +328,12 @@ sub walkelog {
sub eventlog { #Tried various optimizations, but MM seems not to do bulk-request
#TODO: retrieval of non blade events, what should be syntax?
#TODO: try retrieving 5 at a time, then 1 at a time when that stops working
my $cmd=shift;
@ARGV=@_;
my $force;
GetOptions(
"f" => \$force,
);
my $cmd=shift @ARGV;
my $data;
my @output;
my $oid = $eventlogoid;
@ -392,7 +397,7 @@ sub eventlog { #Tried various optimizations, but MM seems not to do bulk-request
return (0,@output);
}
if ($cmd eq "clear") {
unless (isallchassis) {
unless ($force or isallchassis) {
return (1,"Cannot clear eventlogs except for entire chassis");
}
if ($didchassis) { return 0, "eventlog cleared" }