Add hr_cdrom_set variable.

develop
Mike Hiretsky 14 years ago committed by Самоукин Алексей
parent 4445cc0809
commit 11f6a62665

@ -279,6 +279,16 @@ class fillVars(varsShare):
else:
return ""
def get_hr_cdrom_set(self):
"""Cdrom variable"""
if os.path.exists('/sys/block/sr0'):
textLines = self._runos("udevadm info --query=all --name=/dev/dvdrw")
if not textLines is False:
for line in textLines:
if "ID_CDROM=1" in line:
return "on"
return "off"
def get_hr_virtual(self):
"""Virtual machine name (virtualbox, vmware, qemu)"""
pciLines = self._runos("/usr/sbin/lspci")

@ -109,6 +109,9 @@ class Data:
# motherboard vendor
hr_board_vendor = {'hide':True}
# cdrom device
hr_cdrom_set = {}
# processors count
hr_cpu_num = {'hide':True}

Loading…
Cancel
Save