Allow disabling automated LUKS modes.
This commit is contained in:
parent
36a96fedfb
commit
11dd15f123
@ -82,12 +82,16 @@ ChoicePage::ChoicePage( QWidget* parent )
|
|||||||
, m_beforePartitionLabelsView( nullptr )
|
, m_beforePartitionLabelsView( nullptr )
|
||||||
, m_bootloaderComboBox( nullptr )
|
, m_bootloaderComboBox( nullptr )
|
||||||
, m_lastSelectedDeviceIndex( -1 )
|
, m_lastSelectedDeviceIndex( -1 )
|
||||||
|
, m_enableEncryptionWidget( true )
|
||||||
{
|
{
|
||||||
setupUi( this );
|
setupUi( this );
|
||||||
|
|
||||||
m_defaultFsType = Calamares::JobQueue::instance()->
|
m_defaultFsType = Calamares::JobQueue::instance()->
|
||||||
globalStorage()->
|
globalStorage()->
|
||||||
value( "defaultFileSystemType" ).toString();
|
value( "defaultFileSystemType" ).toString();
|
||||||
|
m_enableEncryptionWidget = Calamares::JobQueue::instance()->
|
||||||
|
globalStorage()->
|
||||||
|
value( "enableLuksAutomatedPartitioning" ).toBool();
|
||||||
if ( FileSystem::typeForName( m_defaultFsType ) == FileSystem::Unknown )
|
if ( FileSystem::typeForName( m_defaultFsType ) == FileSystem::Unknown )
|
||||||
m_defaultFsType = "ext4";
|
m_defaultFsType = "ext4";
|
||||||
|
|
||||||
@ -884,7 +888,8 @@ ChoicePage::updateActionChoicePreview( ChoicePage::Choice choice )
|
|||||||
{
|
{
|
||||||
case Alongside:
|
case Alongside:
|
||||||
{
|
{
|
||||||
m_encryptWidget->show();
|
if ( m_enableEncryptionWidget )
|
||||||
|
m_encryptWidget->show();
|
||||||
m_previewBeforeLabel->setText( tr( "Current:" ) );
|
m_previewBeforeLabel->setText( tr( "Current:" ) );
|
||||||
m_selectLabel->setText( tr( "<strong>Select a partition to shrink, "
|
m_selectLabel->setText( tr( "<strong>Select a partition to shrink, "
|
||||||
"then drag the bottom bar to resize</strong>" ) );
|
"then drag the bottom bar to resize</strong>" ) );
|
||||||
@ -930,7 +935,8 @@ ChoicePage::updateActionChoicePreview( ChoicePage::Choice choice )
|
|||||||
case Erase:
|
case Erase:
|
||||||
case Replace:
|
case Replace:
|
||||||
{
|
{
|
||||||
m_encryptWidget->show();
|
if ( m_enableEncryptionWidget )
|
||||||
|
m_encryptWidget->show();
|
||||||
m_previewBeforeLabel->setText( tr( "Current:" ) );
|
m_previewBeforeLabel->setText( tr( "Current:" ) );
|
||||||
m_afterPartitionBarsView = new PartitionBarsView( m_previewAfterFrame );
|
m_afterPartitionBarsView = new PartitionBarsView( m_previewAfterFrame );
|
||||||
m_afterPartitionBarsView->setNestedPartitionsMode( mode );
|
m_afterPartitionBarsView->setNestedPartitionsMode( mode );
|
||||||
|
@ -123,6 +123,7 @@ private:
|
|||||||
int m_lastSelectedDeviceIndex;
|
int m_lastSelectedDeviceIndex;
|
||||||
|
|
||||||
QString m_defaultFsType;
|
QString m_defaultFsType;
|
||||||
|
bool m_enableEncryptionWidget;
|
||||||
|
|
||||||
QMutex m_coreMutex;
|
QMutex m_coreMutex;
|
||||||
};
|
};
|
||||||
|
@ -508,6 +508,17 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|||||||
gs->insert( "defaultFileSystemType", QStringLiteral( "ext4" ) );
|
gs->insert( "defaultFileSystemType", QStringLiteral( "ext4" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( configurationMap.contains( "enableLuksAutomatedPartitioning" ) &&
|
||||||
|
configurationMap.value( "enableLuksAutomatedPartitioning" ).type() == QVariant::Bool )
|
||||||
|
{
|
||||||
|
gs->insert( "enableLuksAutomatedPartitioning",
|
||||||
|
configurationMap.value( "enableLuksAutomatedPartitioning" ).toBool() );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gs->insert( "enableLuksAutomatedPartitioning", true );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Now that we have the config, we load the PartitionCoreModule in the background
|
// Now that we have the config, we load the PartitionCoreModule in the background
|
||||||
// because it could take a while. Then when it's done, we can set up the widgets
|
// because it could take a while. Then when it's done, we can set up the widgets
|
||||||
|
@ -18,3 +18,23 @@ alwaysShowPartitionLabels: true
|
|||||||
# Suggested values: ext2, ext3, ext4, reiser, xfs, jfs, btrfs
|
# Suggested values: ext2, ext3, ext4, reiser, xfs, jfs, btrfs
|
||||||
# If nothing is specified, Calamares defaults to "ext4".
|
# If nothing is specified, Calamares defaults to "ext4".
|
||||||
defaultFileSystemType: "ext4"
|
defaultFileSystemType: "ext4"
|
||||||
|
|
||||||
|
# Show/hide LUKS related functionality in automated partitioning modes.
|
||||||
|
# Disable this if you choose not to deploy early unlocking support in GRUB2
|
||||||
|
# and/or your distribution's initramfs solution.
|
||||||
|
#
|
||||||
|
# BIG FAT WARNING:
|
||||||
|
# This option is unsupported, as it cuts out a crucial security feature.
|
||||||
|
# Disabling LUKS and shipping Calamares without a correctly configured GRUB2
|
||||||
|
# and initramfs is considered suboptimal use of the Calamares software. The
|
||||||
|
# Calamares team will not provide user support for any potential issue that
|
||||||
|
# may arise as a consequence of setting this option to false.
|
||||||
|
# It is strongly recommended that system integrators put in the work to support
|
||||||
|
# LUKS unlocking support in GRUB2 and initramfs/dracut/mkinitcpio/etc.
|
||||||
|
# Support is offered to system integrators that wish to do so, through the
|
||||||
|
# Calamares bug tracker, as well as in #calamares on Freenode.
|
||||||
|
# For more information on setting up GRUB2 for Calamares with LUKS, see
|
||||||
|
# https://github.com/calamares/calamares/wiki/LUKS-Deployment
|
||||||
|
#
|
||||||
|
# If nothing is specified, LUKS is enabled in automated modes.
|
||||||
|
#enableLuksAutomatedPartitioning: true
|
||||||
|
Loading…
Reference in New Issue
Block a user