Изменен алгоритм определения переменной профиля os_root_type

git-svn-id: http://svn.calculate.ru/calculate2/calculate-lib/trunk@1240 c91db197-33c1-4113-bf15-f8a5c547ca64
develop
asamoukin 15 years ago
parent 30a94fd395
commit c05a060d8e

@ -156,13 +156,19 @@ class fillVars(object, cl_base.glob_attr):
mountLunes = self._runos("""%s mount"""%self.path_env)
rootType = "hdd"
if type(mountLunes) == types.ListType:
flagCD = False
for line in mountLunes:
if "/dev/loop0 on / type" in line:
rootType = "ram"
break
if rootType == "ram" and os.path.exists("/mnt/livecd"):
rootType = "livecd"
return rootType
elif "/dev/loop0 on /newroot/mnt/livecd type" in line:
rootType = "ram"
flagCD = True
break
if rootType == "ram":
if os.path.exists("/mnt/livecd") or flagCD:
rootType = "livecd"
return rootType
rootDev = self.Get("os_root_dev")
if rootType != "ram" and rootDev:
slpRootDev = rootDev.split("/dev/")

Loading…
Cancel
Save