[unpackfs] Use the Python mount-API
This commit is contained in:
parent
ba7259d9ee
commit
1b91f831bf
@ -250,22 +250,11 @@ class UnpackOperation:
|
|||||||
:param imgmountdir:
|
:param imgmountdir:
|
||||||
"""
|
"""
|
||||||
if os.path.isdir(entry.source):
|
if os.path.isdir(entry.source):
|
||||||
subprocess.check_call(["mount",
|
libcalamares.utils.mount(entry.source, imgmountdir, "", "--bind")
|
||||||
"--bind", entry.source,
|
|
||||||
imgmountdir])
|
|
||||||
elif os.path.isfile(entry.source):
|
elif os.path.isfile(entry.source):
|
||||||
subprocess.check_call(["mount",
|
libcalamares.utils.mount(entry.source, imgmountdir, entry.sourcefs, "loop")
|
||||||
entry.source,
|
|
||||||
imgmountdir,
|
|
||||||
"-t", entry.sourcefs,
|
|
||||||
"-o", "loop"
|
|
||||||
])
|
|
||||||
else: # entry.source is a device
|
else: # entry.source is a device
|
||||||
subprocess.check_call(["mount",
|
libcalamares.utils.mount(entry.source, imgmountdir, entry.sourcefs, "")
|
||||||
entry.source,
|
|
||||||
imgmountdir,
|
|
||||||
"-t", entry.sourcefs
|
|
||||||
])
|
|
||||||
|
|
||||||
def unpack_image(self, entry, imgmountdir):
|
def unpack_image(self, entry, imgmountdir):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user