Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Alexander_Naumov:SLE-12:Update
cobbler
fix-os-release.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-os-release.patch of Package cobbler
Index: cobbler-2.6.6/setup.py =================================================================== --- cobbler-2.6.6.orig/setup.py +++ cobbler-2.6.6/setup.py @@ -508,6 +508,18 @@ class savestate(statebase): self._copy(os.path.join(etcpath, 'rsync.template'), self.statepath) +def parse_os_release(): + out = {} + osreleasepath = "/etc/os-release" + if os.path.exists(osreleasepath): + with open(osreleasepath, 'rb') as os_release: + out.update( + map( + lambda line: [it.strip('"\n') for it in line.split('=', 1)], + [line for line in os_release.xreadlines() if not line.startswith('#') and '=' in line] + ) + ) + return out @@ -526,7 +538,13 @@ if __name__ == "__main__": logpath = "/var/log/" statepath = "/tmp/cobbler_settings/devinstall" - if os.path.exists("/etc/SuSE-release"): + os_release = parse_os_release() + suse_release = ( + os.path.exists("/etc/SuSE-release") or + os_release.get('ID_LIKE', '').lower() == 'suse' + ) + + if suse_release: webconfig = "/etc/apache2/conf.d" webroot = "/srv/www/" http_user = "wwwrun"
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