From 0278e8962cd26d893ebb9a85460ece481fef2713 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Tue, 12 Mar 2019 15:41:43 +0800 Subject: [PATCH] Handle the output of cpio properly --- xCAT-server/lib/xcat/plugins/anaconda.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 238a6724a..82fb775c6 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -2261,7 +2261,11 @@ sub copycd my $copied = 0; my ($percent, $fout); while () { - next if /^cpio:/; + if (/^cpio:/) { + chomp; + $callback->({ data => $_ }); + next; + } $percent = $copied / $numFiles; $fout = sprintf "%0.2f%%", $percent * 100; $callback->({ sinfo => "$fout" });