From a896e7ed175c10fa204de3c7bf8a16075e0c0bff Mon Sep 17 00:00:00 2001 From: linggao Date: Sat, 11 Jul 2009 19:49:18 +0000 Subject: [PATCH] fixed for RMC event batching response scripts comply with thte new batch file format git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3761 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-rmc/scripts/logeventtoxcat | 4 +++- xCAT-rmc/scripts/updatexcatnodestatus | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/xCAT-rmc/scripts/logeventtoxcat b/xCAT-rmc/scripts/logeventtoxcat index bc14f9529..9c5d88aab 100755 --- a/xCAT-rmc/scripts/logeventtoxcat +++ b/xCAT-rmc/scripts/logeventtoxcat @@ -56,6 +56,8 @@ if (!$batch) { #handle single event } open(FILE1, "<$filename"); + readline(FILE1);#skip first 2 lines + readline(FILE1); my $line1=readline(FILE1); my @aTemp=split(/=/, $line1); my $num_events=$aTemp[1]; @@ -63,7 +65,7 @@ if (!$batch) { #handle single event my $count; for ($count = 1; $count <= $num_events; $count++) { - my $content=`sed -n "/Event $count\$/, /(null)/ p" $filename`; + my $content=`sed -n "/Event $count\$/,/ERRM_COND_BATCH/ p" $filename`; my @content_array=split(/\n/, $content); pop(@content_array); #get rid of last line diff --git a/xCAT-rmc/scripts/updatexcatnodestatus b/xCAT-rmc/scripts/updatexcatnodestatus index 9abcdd41c..96ebd9b88 100755 --- a/xCAT-rmc/scripts/updatexcatnodestatus +++ b/xCAT-rmc/scripts/updatexcatnodestatus @@ -93,6 +93,8 @@ if (!$batch) { } open(FILE1, "<$filename"); + readline(FILE1);#skip first 2 lines + readline(FILE1); my $line1=readline(FILE1); my @aTemp=split(/=/, $line1); my $num_events=$aTemp[1]; @@ -103,7 +105,7 @@ if (!$batch) { my @inactive=(); my %new_value=(); for ($count = 1; $count <= $num_events; $count++) { - my $content=`sed -n "/Event $count\$/, /(null)/ p" $filename`; + my $content=`sed -n "/Event $count\$/,/ERRM_COND_BATCH/ p" $filename`; my @content_array=split(/\n/, $content); pop(@content_array); #get rid of last line