# - 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"
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: