diff --git a/src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp b/src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp index c9c0e1298..83f95ab30 100644 --- a/src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp +++ b/src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp @@ -242,13 +242,6 @@ hasUnencryptedSeparateBoot() { return hasMountPoint( partition, QStringLiteral( "/boot" ) ) && !isEncrypted( partition ); } ); } -STATICTEST bool -hasEncryptedRoot() -{ - return anyPartition( []( const QVariantMap& partition ) - { return hasMountPoint( partition, QStringLiteral( "/" ) ) && isEncrypted( partition ); } ); -} - Calamares::JobResult LuksBootKeyFileJob::exec() { @@ -294,10 +287,9 @@ LuksBootKeyFileJob::exec() return Calamares::JobResult::ok(); } - if ( hasUnencryptedSeparateBoot() && !hasEncryptedRoot() ) + if ( hasUnencryptedSeparateBoot() ) { - // /boot partition is not encrypted, keyfile must not be used - // But only if root partition is not encrypted + // /boot partition is not encrypted, keyfile must not be used. cDebug() << Logger::SubEntry << "/boot partition is not encrypted, skipping keyfile creation."; return Calamares::JobResult::ok(); } diff --git a/src/modules/luksbootkeyfile/Tests.cpp b/src/modules/luksbootkeyfile/Tests.cpp index 6b6c7be81..07eacd8a9 100644 --- a/src/modules/luksbootkeyfile/Tests.cpp +++ b/src/modules/luksbootkeyfile/Tests.cpp @@ -158,7 +158,6 @@ LuksBootKeyFileTests::testAnyPartition() { return hasMountPoint( partdata, QStringLiteral( "/" ) ); } ) ); QVERIFY( !anyPartition( []( const QVariantMap& partdata ) { return hasMountPoint( partdata, QString() ); } ) ); - QVERIFY( !hasEncryptedRoot() ); QVERIFY( hasUnencryptedSeparateBoot() ); }