|
|
|
@ -48,7 +48,11 @@ class fillVars(object, cl_base.glob_attr):
|
|
|
|
|
x.split("=")[1].strip(), data))
|
|
|
|
|
if shortNameList:
|
|
|
|
|
return shortNameList[0]
|
|
|
|
|
return "CLD"
|
|
|
|
|
gentooFile = "/etc/gentoo-release"
|
|
|
|
|
shortName = "Linux"
|
|
|
|
|
if os.path.exists(gentooFile):
|
|
|
|
|
shortName = "Gentoo"
|
|
|
|
|
return shortName
|
|
|
|
|
|
|
|
|
|
def get_os_linux_name(self):
|
|
|
|
|
"""полное название системы"""
|
|
|
|
@ -56,13 +60,14 @@ class fillVars(object, cl_base.glob_attr):
|
|
|
|
|
if linuxShortName:
|
|
|
|
|
dictLinuxName = {"CLD":"Calculate Linux Desktop",
|
|
|
|
|
"CLDX":"Calculate Linux Desktop",
|
|
|
|
|
"CDS":"Calculate Directory Server"}
|
|
|
|
|
"CDS":"Calculate Directory Server",
|
|
|
|
|
"Gentoo":"Gentoo"}
|
|
|
|
|
if linuxShortName in dictLinuxName.keys():
|
|
|
|
|
return dictLinuxName[linuxShortName]
|
|
|
|
|
else:
|
|
|
|
|
return ""
|
|
|
|
|
return "Linux"
|
|
|
|
|
else:
|
|
|
|
|
return ""
|
|
|
|
|
return "Linux"
|
|
|
|
|
|
|
|
|
|
def get_os_linux_subname(self):
|
|
|
|
|
"""постфикс к названию системы"""
|
|
|
|
@ -90,7 +95,19 @@ class fillVars(object, cl_base.glob_attr):
|
|
|
|
|
x.split("=")[1].strip(), data))
|
|
|
|
|
if shortNameList:
|
|
|
|
|
return shortNameList[0]
|
|
|
|
|
return ""
|
|
|
|
|
gentooFile = "/etc/gentoo-release"
|
|
|
|
|
systemVersion = ""
|
|
|
|
|
flagGentoo = False
|
|
|
|
|
if os.path.exists(gentooFile):
|
|
|
|
|
gentooLink = "/etc/make.profile"
|
|
|
|
|
if os.path.islink(gentooLink):
|
|
|
|
|
systemVersion = os.readlink(gentooLink).rpartition("/")[2]
|
|
|
|
|
flagGentoo = True
|
|
|
|
|
if not flagGentoo:
|
|
|
|
|
kernelVersion=self._runos("%s uname -r"%self.path_env)
|
|
|
|
|
if kernelVersion:
|
|
|
|
|
systemVersion = kernelVersion.partition("-")[0]
|
|
|
|
|
return systemVersion
|
|
|
|
|
|
|
|
|
|
def get_os_net_hostname(self):
|
|
|
|
|
'''Считать имя компьютера net_host'''
|
|
|
|
|