]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Modify Linux Red Hat version checking method (to support Red Hat 7.1-7.3, 8.0, 9)
authorvsr <vsr@opencascade.com>
Fri, 25 Feb 2005 06:32:35 +0000 (06:32 +0000)
committervsr <vsr@opencascade.com>
Fri, 25 Feb 2005 06:32:35 +0000 (06:32 +0000)
runInstall

index 367320d94b47bd635ba8e8da215e1b25c55f68e3..82cd745f4acd232ec802e2dacdb76ccf1e66badd 100755 (executable)
@@ -485,10 +485,10 @@ if __name__ == "__main__":
     if (xml_file is None) :
         xml_file_name = "config.xml"
         if os.path.exists("/proc/version"):
-            data = open("/proc/version").readline()
-            res = re.search(r'Red\s+Hat\s+\w+(\s+)?(\d[.]\d)', data)
+            data = open("/etc/redhat-release").readline()
+            res = re.search(r'Red\s+Hat\s+Linux\s+release\s+([\d.]*)', data)
             if res is not None:
-                num = re.sub("[.]", "_", (res.groups())[1])
+                num = re.sub("[.]", "_", (res.groups())[0])
                 filename = "config_RedHat" + num+ ".xml"
                 if (os.path.exists(cur_dir + filename)):
                     xml_file_name = filename