|
|
|
@ -255,6 +255,22 @@ def umount(target):
|
|
|
|
|
target=target) +
|
|
|
|
|
_(":") + str(p.readerr()))
|
|
|
|
|
|
|
|
|
|
def fuser_mountpoint(mp):
|
|
|
|
|
"""
|
|
|
|
|
Проверить занята ли точка монтирования
|
|
|
|
|
"""
|
|
|
|
|
p = process("/bin/fuser","-m",mp)
|
|
|
|
|
return p.success()
|
|
|
|
|
|
|
|
|
|
def try_umount(target):
|
|
|
|
|
"""
|
|
|
|
|
Попытаться отключить точку монтирования
|
|
|
|
|
"""
|
|
|
|
|
try:
|
|
|
|
|
return umount(target)
|
|
|
|
|
except MountError:
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
class BtrfsError(Exception):
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|