Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
systemsmanagement:Uyuni:Snapshots:2021.09
cobbler
prevent-race-condition-writting-tftpboot-files-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File prevent-race-condition-writting-tftpboot-files-bsc1186124.patch of Package cobbler
Index: cobbler-3.1.2/cobbler/tftpgen.py =================================================================== --- cobbler-3.1.2.orig/cobbler/tftpgen.py +++ cobbler-3.1.2/cobbler/tftpgen.py @@ -280,6 +280,8 @@ class TFTPGen(object): link_path = os.path.join(self.bootloc, "grub", "system_link", system.name) if os.path.exists(link_path): utils.rmfile(link_path) + if not os.path.exists(os.path.dirname(link_path)): + utils.mkdir(os.path.dirname(link_path)) os.symlink(os.path.join("..", "system", grub_name), link_path) else: self.write_pxe_file(pxe_path, system, None, None, working_arch, image=profile, metadata=pxe_metadata) @@ -612,6 +614,8 @@ class TFTPGen(object): if filename is not None: self.logger.info("generating: %s" % filename) + if not os.path.exists(os.path.dirname(filename)): + utils.mkdir(os.path.dirname(filename)) fd = open(filename, "w") fd.write(buffer) fd.close()
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor