mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-26 08:58:22 -04:00
Provide sane defaults for restart command, and make it optional.
CAL-372 #close
This commit is contained in:
parent
936e7fab7c
commit
326ff5e724
1 changed files with 10 additions and 3 deletions
|
@ -117,13 +117,20 @@ FinishedViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|||
if ( restartNowEnabled )
|
||||
{
|
||||
if ( configurationMap.contains( "restartNowChecked" ) &&
|
||||
configurationMap.value( "restartNowChecked" ).type() == QVariant::Bool &&
|
||||
configurationMap.contains( "restartNowCommand" ) &&
|
||||
configurationMap.value( "restartNowCommand" ).type() == QVariant::String )
|
||||
configurationMap.value( "restartNowChecked" ).type() == QVariant::Bool )
|
||||
{
|
||||
m_widget->setRestartNowChecked( configurationMap.value( "restartNowChecked" ).toBool() );
|
||||
}
|
||||
|
||||
if ( configurationMap.contains( "restartNowCommand" ) &&
|
||||
configurationMap.value( "restartNowCommand" ).type() == QVariant::String )
|
||||
{
|
||||
m_widget->setRestartNowCommand( configurationMap.value( "restartNowCommand" ).toString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_widget->setRestartNowCommand( "systemctl reboot");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue