|
|
|
@ -20,6 +20,7 @@ import re
|
|
|
|
|
import platform
|
|
|
|
|
from calculate.lib.datavars import Variable,ReadonlyVariable,SimpleDataVars
|
|
|
|
|
from calculate.lib.utils.portage import isPkgInstalled
|
|
|
|
|
from calculate.lib.utils.files import countFiles
|
|
|
|
|
import calculate.lib.cl_template as cl_template
|
|
|
|
|
|
|
|
|
|
class Linux:
|
|
|
|
@ -188,12 +189,20 @@ class VariableOsLinuxBuild(Variable,Linux):
|
|
|
|
|
Build of system
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
class VariableOsLinuxFilesnum(Variable,Linux):
|
|
|
|
|
systemRoot = "/"
|
|
|
|
|
|
|
|
|
|
def get(self):
|
|
|
|
|
"""Get files count"""
|
|
|
|
|
return str(countFiles(self.systemRoot))
|
|
|
|
|
|
|
|
|
|
class LinuxDataVars(SimpleDataVars):
|
|
|
|
|
def __init__(self,systemRoot="/"):
|
|
|
|
|
SimpleDataVars.__init__(self,
|
|
|
|
|
VariableOsLinuxShortname(systemRoot=systemRoot),
|
|
|
|
|
VariableOsLinuxName(),
|
|
|
|
|
VariableOsLinuxSubname(),
|
|
|
|
|
VariableOsLinuxFilesnum(systemRoot=systemRoot),
|
|
|
|
|
VariableOsLinuxSystem(),
|
|
|
|
|
VariableOsLinuxVer(systemRoot=systemRoot),
|
|
|
|
|
VariableOsLinuxBuild(systemRoot=systemRoot))
|
|
|
|
|