From 208968e18901b2ee3269ae0f8554611c4fbce4b9 Mon Sep 17 00:00:00 2001 From: Casandra Qiu Date: Wed, 14 Sep 2016 15:51:59 -0400 Subject: [PATCH] Handle blank spaces in the addkit directory path name --- xCAT-server/lib/xcat/plugins/kit.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/kit.pm b/xCAT-server/lib/xcat/plugins/kit.pm index bdc12da42..4264c447c 100644 --- a/xCAT-server/lib/xcat/plugins/kit.pm +++ b/xCAT-server/lib/xcat/plugins/kit.pm @@ -1267,6 +1267,10 @@ sub addkit push @{ $rsp{data} }, "Extract Kit $kit to /tmp/tmpkit"; xCAT::MsgUtils->message("I", \%rsp, $callback); } + + #avoid while space in the dir name + $kit =~ s/(\s)/\\$1/g; + $rc = system("tar jxvf $kit -C /tmp/tmpkit/"); opendir($dir, "/tmp/tmpkit/");