From 144b51f00ea4a04c4cbf2db45e2abf556eab5f6a Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 3 Feb 2021 01:31:37 +0100 Subject: [PATCH] [partition] Use automount control FIXES #1604 (Admittedly, this fixes the problem only when there's Plasma Solid automount present, and not any of the other kinds; but none of those have been reported yet, and adding them into AutoMount.cpp is opaque to the rest of the system) --- src/modules/partition/core/PartitionCoreModule.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/partition/core/PartitionCoreModule.cpp b/src/modules/partition/core/PartitionCoreModule.cpp index 254d007c1..f99c78745 100644 --- a/src/modules/partition/core/PartitionCoreModule.cpp +++ b/src/modules/partition/core/PartitionCoreModule.cpp @@ -21,6 +21,7 @@ #include "core/PartUtils.h" #include "core/PartitionInfo.h" #include "core/PartitionModel.h" +#include "jobs/AutoMountManagementJob.h" #include "jobs/ClearMountsJob.h" #include "jobs/ClearTempMountsJob.h" #include "jobs/CreatePartitionJob.h" @@ -576,6 +577,11 @@ PartitionCoreModule::jobs( const Config* config ) const #endif #endif + // The automountControl job goes in the list twice: the first + // time it runs, it disables automount and remembers the old setting + // for automount; the second time it restores that old setting. + Calamares::job_ptr automountControl( new AutoMountManagementJob( true /* disable automount */ ) ); + lst << automountControl; lst << Calamares::job_ptr( new ClearTempMountsJob() ); for ( auto info : m_deviceInfos ) @@ -592,6 +598,7 @@ PartitionCoreModule::jobs( const Config* config ) const devices << info->device.data(); } lst << Calamares::job_ptr( new FillGlobalStorageJob( config, devices, m_bootLoaderInstallPath ) ); + lst << automountControl; return lst; }