def create_startup_config(self):
cfg_path = "<STR_LIT>".format(self.host)<EOL>if os.path.isfile(cfg_path):<EOL><INDENT>logger.info(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>',<EOL>self.host)<EOL>handle, cfg_path = tempfile.mkstemp('<STR_LIT>', '<STR_LIT>')<EOL>os.close(handle)<EOL><DEDENT>try:<EOL><INDENT>config = ConfigParser.RawConfigParser()<EOL>config.add_section('<STR_LIT>')<EOL>[<EOL>config.set('<STR_LIT>', "<STR_LIT>" % idx, cmd)<EOL>for idx, cmd in enumerate(self.startups)<EOL>]<EOL>config.add_section('<STR_LIT>')<EOL>[<EOL>config.set('<STR_LIT>', "<STR_LIT>" % idx, cmd)<EOL>for idx, cmd in enumerate(self.shutdowns)<EOL>]<EOL>config.add_section('<STR_LIT:source>')<EOL>[<EOL>config.set('<STR_LIT:source>', "<STR_LIT>" % idx, path)<EOL>for idx, path in enumerate(self.sources)<EOL>]<EOL>with open(cfg_path, '<STR_LIT:w>') as fds:<EOL><INDENT>config.write(fds)<EOL><DEDENT><DEDENT>except Exception as exc:<EOL><INDENT>logger.error(<EOL>'<STR_LIT>',<EOL>exc,<EOL>exc_info=True)<EOL><DEDENT>return cfg_path<EOL>
Startup and shutdown commands config
        Used by agent.py on the target