From 8313239850c75710618def243d20e1707ae3f481 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Fri, 1 Dec 2017 11:46:01 -0500 Subject: [PATCH] OpenBMC rspconfig dump better dump file name formatting --- xCAT-server/lib/xcat/plugins/openbmc.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 162c83cc9..093ff906e 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -2856,7 +2856,8 @@ sub dump_download_process { my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($node_info{$node}{generated}); $mon += 1; $year += 1900; - my $file_name = "/var/log/xcat/dump/" . $year . $mon . $mday . $hour . $min . "_$node" . "_dump_$dump_id.tar.xz"; + my $formatted_time = sprintf ("%04d%02d%02d%02d%02d", $year, $mon, $mday, $hour, $min); + my $file_name = "/var/log/xcat/dump/" . $formatted_time . "_$node" . "_dump_$dump_id.tar.xz"; my $down_url; $down_url = $status_info{RSPCONFIG_DUMP_DOWNLOAD_REQUEST}{init_url}; $down_url =~ s/#ID#/$dump_id/g;