mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 19:05:46 -05:00
[machineid] Simplify loading of the list of entropy-files
This commit is contained in:
parent
275e6b9342
commit
daeee09fdb
1 changed files with 3 additions and 8 deletions
|
@ -153,18 +153,13 @@ MachineIdJob::setConfigurationMap( const QVariantMap& map )
|
||||||
m_dbus_symlink = m_dbus && m_dbus_symlink;
|
m_dbus_symlink = m_dbus && m_dbus_symlink;
|
||||||
|
|
||||||
m_entropy_copy = CalamaresUtils::getBool( map, "entropy-copy", false );
|
m_entropy_copy = CalamaresUtils::getBool( map, "entropy-copy", false );
|
||||||
|
|
||||||
m_entropy_files = CalamaresUtils::getStringList( map, "entropy-files" );
|
m_entropy_files = CalamaresUtils::getStringList( map, "entropy-files" );
|
||||||
if ( CalamaresUtils::getBool( map, "entropy", false ) )
|
if ( CalamaresUtils::getBool( map, "entropy", false ) )
|
||||||
{
|
{
|
||||||
cWarning() << "MachineId:: configuration setting *entropy* is deprecated, use *entropy-files*.";
|
cWarning() << "MachineId:: configuration setting *entropy* is deprecated, use *entropy-files* instead.";
|
||||||
|
m_entropy_files.append( QStringLiteral( "/var/lib/urandom/random-seed" ) );
|
||||||
QString target_entropy_file = QStringLiteral( "/var/lib/urandom/random-seed" );
|
|
||||||
if ( !m_entropy_files.contains( target_entropy_file ) )
|
|
||||||
{
|
|
||||||
m_entropy_files.append( target_entropy_file );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
m_entropy_files.removeDuplicates();
|
||||||
}
|
}
|
||||||
|
|
||||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( MachineIdJobFactory, registerPlugin< MachineIdJob >(); )
|
CALAMARES_PLUGIN_FACTORY_DEFINITION( MachineIdJobFactory, registerPlugin< MachineIdJob >(); )
|
||||||
|
|
Loading…
Add table
Reference in a new issue