From 4a04c8fb10a1a331930565ecd14d498f35ca5ad6 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 10 Oct 2013 09:09:37 -0400 Subject: [PATCH] defect 3823 --- xCAT-server/lib/xcat/plugins/tabutils.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/tabutils.pm b/xCAT-server/lib/xcat/plugins/tabutils.pm index bc3c32c55..0d94c60fb 100644 --- a/xCAT-server/lib/xcat/plugins/tabutils.pm +++ b/xCAT-server/lib/xcat/plugins/tabutils.pm @@ -1220,9 +1220,14 @@ sub tabprune_numberdays { $hour, $min, $sec); # delete all records before # days ago - # display the output + # display the output + # get field name for the table + my $timeattr="audittime"; # default auditlog, most used + if ($table eq "eventlog") { + $timeattr="eventtime"; + } my @attrarray; - push @attrarray, "audittime<$daysago"; + push @attrarray, "$timeattr<$daysago"; my @recs; if ($VERBOSE) { # need to get all attributes @recs = $tab->getAllAttribsWhere(\@attrarray, 'ALL');