From 1b91f831bf9b0cd16f9066256f2fda747e7d7938 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 20 Jun 2019 16:14:30 +0200 Subject: [PATCH] [unpackfs] Use the Python mount-API --- src/modules/unpackfs/main.py | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index ac90a994e..8d790ce1d 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -250,22 +250,11 @@ class UnpackOperation: :param imgmountdir: """ if os.path.isdir(entry.source): - subprocess.check_call(["mount", - "--bind", entry.source, - imgmountdir]) + libcalamares.utils.mount(entry.source, imgmountdir, "", "--bind") elif os.path.isfile(entry.source): - subprocess.check_call(["mount", - entry.source, - imgmountdir, - "-t", entry.sourcefs, - "-o", "loop" - ]) + libcalamares.utils.mount(entry.source, imgmountdir, entry.sourcefs, "loop") else: # entry.source is a device - subprocess.check_call(["mount", - entry.source, - imgmountdir, - "-t", entry.sourcefs - ]) + libcalamares.utils.mount(entry.source, imgmountdir, entry.sourcefs, "") def unpack_image(self, entry, imgmountdir): """