From 208968e18901b2ee3269ae0f8554611c4fbce4b9 Mon Sep 17 00:00:00 2001 From: Casandra Qiu Date: Wed, 14 Sep 2016 15:51:59 -0400 Subject: [PATCH 1/3] 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/"); From fa60d72e64707fc775c3ac560c16ea9c665a8fb1 Mon Sep 17 00:00:00 2001 From: Casandra Qiu Date: Mon, 19 Sep 2016 13:08:49 -0400 Subject: [PATCH 2/3] Modify "while" to "white" --- xCAT-server/lib/xcat/plugins/kit.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/kit.pm b/xCAT-server/lib/xcat/plugins/kit.pm index 4264c447c..acee2e98e 100644 --- a/xCAT-server/lib/xcat/plugins/kit.pm +++ b/xCAT-server/lib/xcat/plugins/kit.pm @@ -1268,7 +1268,7 @@ sub addkit xCAT::MsgUtils->message("I", \%rsp, $callback); } - #avoid while space in the dir name + #avoid white space in the dir name $kit =~ s/(\s)/\\$1/g; $rc = system("tar jxvf $kit -C /tmp/tmpkit/"); From 299e3e71185e1d63dd91d578d6bca24f42433b83 Mon Sep 17 00:00:00 2001 From: Casandra Qiu Date: Mon, 19 Sep 2016 13:09:54 -0400 Subject: [PATCH 3/3] change "avoid" to "support" --- xCAT-server/lib/xcat/plugins/kit.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/kit.pm b/xCAT-server/lib/xcat/plugins/kit.pm index acee2e98e..6e135ba8c 100644 --- a/xCAT-server/lib/xcat/plugins/kit.pm +++ b/xCAT-server/lib/xcat/plugins/kit.pm @@ -1268,7 +1268,7 @@ sub addkit xCAT::MsgUtils->message("I", \%rsp, $callback); } - #avoid white space in the dir name + #support white space in the dir name $kit =~ s/(\s)/\\$1/g; $rc = system("tar jxvf $kit -C /tmp/tmpkit/");