X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=source%2Fcompatibility.py;h=ab2ab4a6c22ec3c3f61e202f2909d646f3c1c326;hb=68ad23d951bfc289a733e7388f505ba022df05ee;hp=b2e7f02bbad4c06d5a0b0422e80f348468c6c67c;hpb=7ab7e9dd797333a9fdc8604554e16e192a32144d;p=bootmanager.git diff --git a/source/compatibility.py b/source/compatibility.py index b2e7f02..ab2ab4a 100644 --- a/source/compatibility.py +++ b/source/compatibility.py @@ -1,3 +1,12 @@ +#!/usr/bin/python2 + +# Copyright (c) 2003 Intel Corporation +# All rights reserved. +# +# Copyright (c) 2004-2006 The Trustees of Princeton University +# All rights reserved. + + """ Various functions that are used to allow the boot manager to run on various different cds are included here @@ -6,6 +15,7 @@ different cds are included here import string import os, sys +from Exceptions import * import utils import BootServerRequest @@ -18,7 +28,7 @@ def setup_lvm_2x_cd( vars, log ): Expect the following variables to be set: TEMP_PATH somewhere to store what we need to run BOOT_CD_VERSION A tuple of the current bootcd version - ALPINA_SERVER_DIR directory on the boot servers containing alpina + SUPPORT_FILE_DIR directory on the boot servers containing scripts and support files LVM_SETUP_2X_CD indicates if lvm is downloaded and setup for 2.x cds @@ -36,9 +46,9 @@ def setup_lvm_2x_cd( vars, log ): if BOOT_CD_VERSION == "": raise ValueError, "BOOT_CD_VERSION" - ALPINA_SERVER_DIR= vars["ALPINA_SERVER_DIR"] - if ALPINA_SERVER_DIR == None: - raise ValueError, "ALPINA_SERVER_DIR" + SUPPORT_FILE_DIR= vars["SUPPORT_FILE_DIR"] + if SUPPORT_FILE_DIR == None: + raise ValueError, "SUPPORT_FILE_DIR" except KeyError, var: raise BootManagerException, "Missing variable in vars: %s\n" % var @@ -67,7 +77,7 @@ def setup_lvm_2x_cd( vars, log ): # download and extract support tarball for this step, # which has everything we need to successfully run step_support_file= "alpina-BootLVM.tar.gz" - source_file= "%s/%s" % (ALPINA_SERVER_DIR,step_support_file) + source_file= "%s/%s" % (SUPPORT_FILE_DIR,step_support_file) dest_file= "%s/%s" % (TEMP_PATH, step_support_file) log.write( "Downloading support file for this step\n" ) @@ -104,7 +114,7 @@ def setup_partdisks_2x_cd( vars, log ): Expect the following variables to be set: TEMP_PATH somewhere to store what we need to run BOOT_CD_VERSION A tuple of the current bootcd version - ALPINA_SERVER_DIR directory on the boot servers containing alpina + SUPPORT_FILE_DIR directory on the boot servers containing scripts and support files PARTDISKS_SETUP_2X_CD indicates if lvm is downloaded and setup for 2.x cds @@ -122,9 +132,9 @@ def setup_partdisks_2x_cd( vars, log ): if BOOT_CD_VERSION == "": raise ValueError, "BOOT_CD_VERSION" - ALPINA_SERVER_DIR= vars["ALPINA_SERVER_DIR"] - if ALPINA_SERVER_DIR == None: - raise ValueError, "ALPINA_SERVER_DIR" + SUPPORT_FILE_DIR= vars["SUPPORT_FILE_DIR"] + if SUPPORT_FILE_DIR == None: + raise ValueError, "SUPPORT_FILE_DIR" except KeyError, var: raise BootManagerException, "Missing variable in vars: %s\n" % var @@ -151,7 +161,7 @@ def setup_partdisks_2x_cd( vars, log ): # download and extract support tarball for this step, # which has everything we need to successfully run step_support_file= "alpina-PartDisks.tar.gz" - source_file= "%s/%s" % (ALPINA_SERVER_DIR,step_support_file) + source_file= "%s/%s" % (SUPPORT_FILE_DIR,step_support_file) dest_file= "%s/%s" % (TEMP_PATH, step_support_file) log.write( "Downloading support file for this step\n" )