File fix-os-release.patch of Package cobbler.8146

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"