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

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

@ -156,11 +156,17 @@ class fillVars(object, cl_base.glob_attr):
mountLunes = self._runos("""%s mount"""%self.path_env) mountLunes = self._runos("""%s mount"""%self.path_env)
rootType = "hdd" rootType = "hdd"
if type(mountLunes) == types.ListType: if type(mountLunes) == types.ListType:
flagCD = False
for line in mountLunes: for line in mountLunes:
if "/dev/loop0 on / type" in line: if "/dev/loop0 on / type" in line:
rootType = "ram" rootType = "ram"
break break
if rootType == "ram" and os.path.exists("/mnt/livecd"): 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" rootType = "livecd"
return rootType return rootType
rootDev = self.Get("os_root_dev") rootDev = self.Get("os_root_dev")

Loading…
Cancel
Save