diff --git a/src/modules/fstab/main.py b/src/modules/fstab/main.py index 95f10a643..2b261fc66 100755 --- a/src/modules/fstab/main.py +++ b/src/modules/fstab/main.py @@ -173,7 +173,6 @@ class FstabGenerator(object): for p in self.partitions]): password = "none" crypttab_options = "" - return dict( name=mapper_name, @@ -342,10 +341,8 @@ def create_swapfile(root_mount_point, root_btrfs): swapfile_path = os.path.join(root_mount_point, "swap/swapfile") with open(swapfile_path, "wb") as f: pass - o = subprocess.check_output(["chattr", "+C", swapfile_path]) - libcalamares.utils.debug("swapfile attributes: {!s}".format(o)) - o = subprocess.check_output(["btrfs", "property", "set", swapfile_path, "compression", "none"]) - libcalamares.utils.debug("swapfile compression: {!s}".format(o)) + libcalamares.utils.host_env_process_output(["btrfs", "property", "set", swapfile_path, "compression", "none"]) + libcalamares.utils.host_env_process_output(["chattr", "+C", swapfile_path]) # No Copy-on-Write else: swapfile_path = os.path.join(root_mount_point, "swapfile") with open(swapfile_path, "wb") as f: @@ -363,8 +360,7 @@ def create_swapfile(root_mount_point, root_btrfs): libcalamares.job.setprogress(0.2 + 0.3 * ( total / desired_size ) ) total += chunk os.chmod(swapfile_path, 0o600) - o = subprocess.check_output(["mkswap", swapfile_path]) - libcalamares.utils.debug("swapfile mkswap: {!s}".format(o)) + libcalamares.utils.host_env_process_output(["mkswap", swapfile_path]) libcalamares.job.setprogress(0.5)