def make_script(self, procname): script = self.traitscripts.get(procname) if script is not None: # special handling for the chroot script to ensure # it's run in the target chroot if procname == 'chroot': tmpscript = make_script(procname, script, self.target, execpath=True) return 'chroot %s %s' % (self.target, tmpscript) else: return make_script(procname, script, self.target, execpath=False) else: return None
def make_script(self, procname): script = self.traitscripts.get(procname) if script is not None: # special handling for the chroot script to ensure # it's run in the target chroot if procname == "chroot": tmpscript = make_script(procname, script, self.target, execpath=True) # return 'chroot %s %s' % (self.target, tmpscript) return ["chroot", str(self.target), tmpscript] else: return make_script(procname, script, self.target, execpath=False) else: return None
def make_script(self, procname): self.check_machine_set() script = self.machine.relation.get_script(procname, inherited=True) if script is not None: return make_script(procname, script, '/') else: return None
def _make_script(self, name, execpath=False): script = self.traitscripts.get(name) if script is not None: stmt = '%s script exists for trait %s' % (name, self._current_trait_) self.log.info(stmt) return make_script(name, script, self.target, execpath=execpath) else: return None
def _make_script(self, name): script = self.machine.get_script(name) if script is not None: return make_script(name, script, '/') else: return None