From daeee09fdbc796fd76ff2ae7a1ee683ddd2ad88c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 23 Oct 2020 17:15:55 +0200 Subject: [PATCH] [machineid] Simplify loading of the list of entropy-files --- src/modules/machineid/MachineIdJob.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/modules/machineid/MachineIdJob.cpp b/src/modules/machineid/MachineIdJob.cpp index 8a33288b9..fef63828a 100644 --- a/src/modules/machineid/MachineIdJob.cpp +++ b/src/modules/machineid/MachineIdJob.cpp @@ -153,18 +153,13 @@ MachineIdJob::setConfigurationMap( const QVariantMap& map ) m_dbus_symlink = m_dbus && m_dbus_symlink; m_entropy_copy = CalamaresUtils::getBool( map, "entropy-copy", false ); - m_entropy_files = CalamaresUtils::getStringList( map, "entropy-files" ); if ( CalamaresUtils::getBool( map, "entropy", false ) ) { - cWarning() << "MachineId:: configuration setting *entropy* is deprecated, use *entropy-files*."; - - 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 ); - } + cWarning() << "MachineId:: configuration setting *entropy* is deprecated, use *entropy-files* instead."; + m_entropy_files.append( QStringLiteral( "/var/lib/urandom/random-seed" ) ); } + m_entropy_files.removeDuplicates(); } CALAMARES_PLUGIN_FACTORY_DEFINITION( MachineIdJobFactory, registerPlugin< MachineIdJob >(); )