From 51b36066c018d8ab6a333eaba3c2eac7e9937d0c Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 27 Oct 2006 13:54:05 +0000 Subject: [PATCH] Improve for 64bit platforms --- runInstall | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/runInstall b/runInstall index 3c287bc..b6030df 100755 --- a/runInstall +++ b/runInstall @@ -872,12 +872,12 @@ if __name__ == "__main__": # - Scientific Linux 3.0.5 # - Mandriva 2006.0 32bit/64bit data = open("/etc/redhat-release").readline() - res = re.search(r'(.*)[L|l]inux.*release\s+([\d.]*).*\s+(\S+)', data) + res = re.search(r'(.*)[L|l]inux.*release\s+([\d.]*)', data) if res: plt_name = "".join(res.group(1).split()) plt_ver = res.group(2) - if plt_name != "RedHat": - plt_bit = res.group(3) + if re.search(r'x86_64', data): + plt_bit = "_64" elif os.path.exists("/etc/debian_version"): # - Debian 3.1 plt_name = "Debian" @@ -885,20 +885,14 @@ if __name__ == "__main__": elif os.path.exists("/etc/mandriva-release"): # - Mandriva 2006 (an additional check if above check fails) data = open("/etc/mandriva-release").readline() - res = re.search(r'(.*)[L|l]inux.*release\s+([\d.]*).*for\s+(\S+)', data) + res = re.search(r'(.*)[L|l]inux.*release\s+([\d.]*)', data) if res: plt_name = "".join(res.group(1).split()) plt_ver = res.group(2) - plt_bit = res.group(3) - if plt_bit == "x86_64": - plt_bit = "_64" - _xml_file_name = "config_Mandriva_2006.0_64.xml" - msg = "%s"%_xml_file_name - warning(msg) - else: - _xml_file_name = "config_%s_%s.xml"%(plt_name, plt_ver) - msg = "%s"%_xml_file_name - warning(msg) + if re.search(r'x86_64', data): + plt_bit = "_64" + pass + _xml_file_name = "config_%s_%s%s.xml"%(plt_name, plt_ver, plt_bit) if plt_name and plt_ver and os.path.exists("%s/%s"%(cur_dir, _xml_file_name)): xml_file_name = _xml_file_name else: -- 2.39.2