def bootnodecustomservice(self, node, s, services, useStartupService):
        ''' Start a custom service on a node. Create private dirs, use supplied
            config files, and execute  supplied startup commands.
        '''
        if node.verbose:
            node.info("starting service %s (%s)(custom)" % (s._name, s._startindex))
        for d in s._dirs:
            try:
                node.privatedir(d)
            except Exception,  e:
                node.warn("Error making node %s dir %s: %s" % \
                          (node.name,  d,  e))
        for i, filename in enumerate(s._configs): 
            if len(filename) == 0:
                continue
            cfg = self.getservicefiledata(s, filename)
            if cfg is None:
                cfg = s.generateconfig(node, filename, services)                
            # cfg may have a file:/// url for copying from a file
            try:
                if self.copyservicefile(node, filename, cfg):
                    continue
            except IOError, e:
                node.warn("Error copying service file %s" % filename)
                node.exception(coreapi.CORE_EXCP_LEVEL_ERROR,
                    "service:%s" % s._name, 
                    "error copying service file '%s': %s" % (filename, e))
                continue
            node.nodefile(filename,  cfg)
            
        if useStartupService and not self.isStartupService(s):
            return

        for cmd in s._startup:
            try:
                # NOTE: this wait=False can be problematic!
                node.cmd(shlex.split(cmd),  wait = False)
            except Exception, e:
                node.warn("error starting command %s: %s" % (cmd, e))
dataset/ETHPy150Open coreemu/core/daemon/core/service.py/CoreServices.bootnodecustomservice/original