From b0bfc2829ab1fc46fa20a0954ac563e4ced6f7c0 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Mon, 24 Nov 2008 20:28:40 +0000 Subject: [PATCH] download plain bootstrapfs tarball if the plain-bootstrapfs tag is set --- source/steps/InstallBootstrapFS.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/source/steps/InstallBootstrapFS.py b/source/steps/InstallBootstrapFS.py index 11db5b9..fee0f57 100644 --- a/source/steps/InstallBootstrapFS.py +++ b/source/steps/InstallBootstrapFS.py @@ -100,6 +100,16 @@ def Run( vars, log ): log.write("WARNING : Failed to query tag 'extensions' - installing only core software\n") extensions = [] + # check if the plain-bootstrapfs tag is set + download_suffix=".tar.bz2" + untar_option="-j" + try: + if BootAPI.call_api_function (vars, "GetNodePlainBootstrapfs", ([NODE_ID])): + download_suffix=".tar" + untar_option="" + except: + pass + # see also GetBootMedium in PLCAPI that does similar things # figuring the default node family: # (1) look at /etc/planetlab/nodefamily on the bootcd @@ -126,7 +136,7 @@ def Run( vars, log ): yum_extensions = [] # download and extract support tarball for this step, for bootstrapfs_name in bootstrapfs_names: - tarball = "bootstrapfs-%s-%s.tar.bz2"%(bootstrapfs_name,arch) + tarball = "bootstrapfs-%s-%s%s"%(bootstrapfs_name,arch,download_suffix) source_file= "%s/%s" % (SUPPORT_FILE_DIR,tarball) dest_file= "%s/%s" % (SYSIMG_PATH, tarball) @@ -138,7 +148,7 @@ def Run( vars, log ): 30, 14400) if result: log.write( "extracting %s in %s\n" % (dest_file,SYSIMG_PATH) ) - result= utils.sysexec( "tar -C %s -xpjf %s" % (SYSIMG_PATH,dest_file), log ) + result= utils.sysexec( "tar -C %s -xpf %s %s" % (SYSIMG_PATH,dest_file,untar_option), log ) log.write( "Done\n") utils.removefile( dest_file ) else: -- 2.43.0