From 81f2d36d66a86cd9d9d06a37df7e4eec3daf3cf2 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 17 May 2006 07:40:46 +0000 Subject: [PATCH] Modify runInstall script for Mandriva 2006.0 --- runInstall | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/runInstall b/runInstall index e4811f1..2166b2e 100755 --- a/runInstall +++ b/runInstall @@ -869,6 +869,7 @@ if __name__ == "__main__": # - Red Hat Linux 9 # - Mandrake Linux 10.1 # - Scientific Linux 3.0.5 + # - Mandriva 2006.0 data = open("/etc/redhat-release").readline() res = re.search(r'(.*)[L|l]inux.*release\s+([\d.]*)', data) if res: @@ -878,13 +879,13 @@ if __name__ == "__main__": # - Debian 3.1 plt_name = "Debian" plt_ver = open("/etc/debian_version").readline().strip() - _xml_file_name = "config_%s_%s.xml"%(plt_name, plt_ver) - if plt_name and plt_ver and os.path.exists("%s/%s"%(cur_dir, _xml_file_name)): - xml_file_name = _xml_file_name - elif os.path.exists("/etc/mandriva_release"): - # - Mandriva 2006 - plt_name = "Mandriva" - plt_ver = open("/etc/mandriva_release").readline().strip() + 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.]*)', data) + if res: + plt_name = "".join(res.group(1).split()) + plt_ver = res.group(2) _xml_file_name = "config_%s_%s.xml"%(plt_name, plt_ver) if plt_name and plt_ver and os.path.exists("%s/%s"%(cur_dir, _xml_file_name)): xml_file_name = _xml_file_name -- 2.39.2