From f111a662a7320e1a522e76494da2ecf443aa5dc7 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 25 Feb 2005 06:32:35 +0000 Subject: [PATCH] Modify Linux Red Hat version checking method (to support Red Hat 7.1-7.3, 8.0, 9) --- runInstall | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runInstall b/runInstall index 367320d..82cd745 100755 --- a/runInstall +++ b/runInstall @@ -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 -- 2.39.2