returns = Parameter(str, "Node boot medium, either inlined, or filename, depending to the filename parameter")
BOOTCDDIR = "/usr/share/bootcd/"
returns = Parameter(str, "Node boot medium, either inlined, or filename, depending to the filename parameter")
BOOTCDDIR = "/usr/share/bootcd/"
GENERICDIR = "/var/www/html/download/"
NODEDIR = "/var/tmp/bootmedium/results"
WORKDIR = "/var/tmp/bootmedium/work"
GENERICDIR = "/var/www/html/download/"
NODEDIR = "/var/tmp/bootmedium/results"
WORKDIR = "/var/tmp/bootmedium/work"
if not os.path.isfile(generic_path):
raise PLCAPIError, "Cannot locate generic medium %s"%generic_path
if not os.path.isfile(generic_path):
raise PLCAPIError, "Cannot locate generic medium %s"%generic_path
- if not os.path.isfile(self.BOOTCUSTOM):
- raise PLCAPIError, "Cannot locate bootcustom script %s"%self.BOOTCUSTOM
+ if not os.path.isfile(self.BOOTCDBUILD):
+ raise PLCAPIError, "Cannot locate bootcd/build.sh script %s"%self.BOOTCDBUILD
- # invoke bootcustom
- bootcustom_command = 'sudo %s -C "%s" "%s" "%s"'%(self.BOOTCUSTOM,
- tempdir,
- generic_path,
- node_floppy)
+ node_image = "%s/%s"%(tempdir,nodename)
+ # invoke build.sh
+ build_command = '%s -f "%s" -O "%s" -t "%s" &> %s.log' % (self.BOOTCDBUILD,
+ node_floppy,
+ node_image,
+ suffix[1:],
+ node_image)
- print 'bootcustom command:',bootcustom_command
- ret=os.system(bootcustom_command)
+ print 'build command:',build_command
+ ret=os.system(build_command)