2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 19:52:03 +00:00

Use shell function base64decode() instead of python

This commit is contained in:
GONG Jie 2018-12-28 15:33:04 +08:00
parent ea6f4afcfc
commit 18b416dc06

View File

@ -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.enc >/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.enc >/tmp/partitionfile\n";
#replace the #XCA_PARTITION_SCRIPT#
$inc =~ s/#XCA_PARTITION_SCRIPT#/$partcontent/;