From 18b416dc06cea27966870a8578d9a89a30fbb19c Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Fri, 28 Dec 2018 15:33:04 +0800 Subject: [PATCH] Use shell function base64decode() instead of python --- xCAT-server/lib/perl/xCAT/Template.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index 759110740..801581446 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -429,7 +429,7 @@ sub subvars { $partcontent .= "rm -rf /tmp/partitionfile\n"; # Put the code to decode the partitionfile - $partcontent .= "python -c 'import base64; print base64.b64decode(open(\"/tmp/partscript.enc\",\"rb\").read())' >/tmp/partscript\n"; + $partcontent .= "base64decode/tmp/partscript\n"; $partcontent .= "chmod 755 /tmp/partscript\n"; $partcontent .= "/tmp/partscript\n"; @@ -490,7 +490,7 @@ sub subvars { $partcontent .= "rm -rf /tmp/partitionfile\n"; # Put the code to decode the partitionfile - $partcontent .= "python -c 'import base64; print base64.b64decode(open(\"/tmp/partitionfile.enc\",\"rb\").read())' >/tmp/partitionfile\n"; + $partcontent .= "base64decode/tmp/partitionfile\n"; #replace the #XCA_PARTITION_SCRIPT# $inc =~ s/#XCA_PARTITION_SCRIPT#/$partcontent/;