From 36a311a213c55d403fcb04b0be769265c7b12d10 Mon Sep 17 00:00:00 2001 From: Mike Hiretsky Date: Fri, 25 Jun 2010 09:46:55 +0400 Subject: [PATCH] Add os_linux_system variable --- pym/cl_fill.py | 15 +++++++++++++++ pym/cl_vars.py | 3 +++ 2 files changed, 18 insertions(+) diff --git a/pym/cl_fill.py b/pym/cl_fill.py index 3a78692..db90a36 100644 --- a/pym/cl_fill.py +++ b/pym/cl_fill.py @@ -718,3 +718,18 @@ class fillVars(glob_attr): except: return "" return homeDir + + def get_os_linux_system(self): + """Get linux system (server or desktop)""" + mapNameSystem = {'CDS':'server', + 'CLD':'desktop', + 'CLDG':'desktop', + 'CLDX':'desktop', + 'CLS':'desktop', + 'CSS':'server' + } + shortName = self.Get('os_linux_shortname') + if shortName in mapNameSystem: + return mapNameSystem[shortName] + else: + return "" diff --git a/pym/cl_vars.py b/pym/cl_vars.py index 3f35ccf..76c840a 100644 --- a/pym/cl_vars.py +++ b/pym/cl_vars.py @@ -107,6 +107,9 @@ class Data: # постфикс к названию системы os_linux_subname = {} + # system (desktop or server) + os_linux_system = {} + # motherboard model hr_board_model = {}