Added new variable cl_kernel_uid.

Variable has value of 8 char of UUID root device.
develop
Mike Hiretsky 14 years ago
parent c3dd11e18c
commit 237aa8dfaf

@ -885,3 +885,18 @@ class fillVars(glob_attr):
return "vmware"
else:
return "vesa"
def get_cl_kernel_uid(self):
uuidpath = '/dev/disk/by-uuid'
if not os.access(uuidpath,os.R_OK):
return ""
uuidDevs = filter(os.path.islink,map(lambda x: os.path.join(uuidpath,x),
os.listdir(uuidpath)))
mapDevUuid = dict(map(lambda x:(os.path.normpath(os.path.join(uuidpath,
os.readlink(x))),
os.path.basename(x)),
uuidDevs))
if self.Get('os_root_dev') in mapDevUuid:
return mapDevUuid[self.Get('os_root_dev')][:8]
else:
return ""

@ -147,6 +147,8 @@ class Data:
# user email
ur_mail = {'official':True}
# kernel uid get by uuid root device
cl_kernel_uid = {}
# variable for calculate-client and calculate-desktop packages
# ip or domain name of CDS
cl_remote_host = {'mode':'r', 'official':True}

Loading…
Cancel
Save