mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 01:15:38 -04:00
[users] Introduce userShell setting
- Add a *userShell* key, which can be left out (default, backwards- compatible) to retain the old /bin/bash behavior, or explicitly set to empty to defer to useradd-configuration, or explicitly set to something non-empty to use that shell.
This commit is contained in:
parent
ed15edabf9
commit
0d24c1db6c
3 changed files with 22 additions and 2 deletions
|
@ -22,9 +22,11 @@
|
|||
|
||||
#include "UsersPage.h"
|
||||
|
||||
#include "utils/CalamaresUtils.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "JobQueue.h"
|
||||
|
||||
#include "GlobalStorage.h"
|
||||
#include "JobQueue.h"
|
||||
|
||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( UsersViewStepFactory, registerPlugin<UsersViewStep>(); )
|
||||
|
||||
|
@ -181,5 +183,12 @@ UsersViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|||
m_widget->addPasswordCheck( i.key(), i.value() );
|
||||
}
|
||||
}
|
||||
|
||||
QString shell( QLatin1Literal( "/bin/bash" ) ); // as if it's not set at all
|
||||
if ( configurationMap.contains( "userShell" ) )
|
||||
shell = CalamaresUtils::getString( configurationMap, "userShell" );
|
||||
// Now it might be explicitly set to empty, which is ok
|
||||
|
||||
Calamares::JobQueue::instance()->globalStorage()->insert( "userShell", shell );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue