mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 01:45:36 -04:00
Move detect_firmware_type to the prepare module.
This avoids the duplication between the bootloader and grub modules.
This commit is contained in:
parent
930a49677a
commit
4df754ef29
4 changed files with 12 additions and 24 deletions
|
@ -32,6 +32,7 @@
|
|||
#include <QDBusConnection>
|
||||
#include <QDBusInterface>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QLabel>
|
||||
#include <QProcess>
|
||||
|
@ -133,6 +134,9 @@ PrepareViewStep::PrepareViewStep( QObject* parent )
|
|||
m_nextEnabled = canGoNext;
|
||||
emit nextStatusChanged( m_nextEnabled );
|
||||
|
||||
if ( canGoNext )
|
||||
detectFirmwareType();
|
||||
|
||||
timer->deleteLater();
|
||||
} );
|
||||
timer->start( 0 );
|
||||
|
@ -363,3 +367,10 @@ PrepareViewStep::checkHasInternet()
|
|||
return nmState == NM_STATE_CONNECTED_GLOBAL;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PrepareViewStep::detectFirmwareType()
|
||||
{
|
||||
QString fwType = QFile::exists( "/sys/firmware/efi/efivars" ) ? "efi" : "bios";
|
||||
Calamares::JobQueue::instance()->globalStorage()->insert( "firmwareType", fwType );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue