[users] Rename badly-named variable
This commit is contained in:
parent
a87bb50103
commit
3ea6c6cfbe
@ -154,29 +154,29 @@ CreateUserJob::exec()
|
|||||||
useradd << "-c" << m_fullName;
|
useradd << "-c" << m_fullName;
|
||||||
useradd << m_userName;
|
useradd << m_userName;
|
||||||
|
|
||||||
auto pres = CalamaresUtils::System::instance()->targetEnvCommand( useradd );
|
auto commandResult = CalamaresUtils::System::instance()->targetEnvCommand( useradd );
|
||||||
if ( pres.getExitCode() )
|
if ( commandResult.getExitCode() )
|
||||||
{
|
{
|
||||||
cError() << "useradd failed" << pres.getExitCode();
|
cError() << "useradd failed" << commandResult.getExitCode();
|
||||||
return pres.explainProcess( useradd, 10 /* bogus timeout */ );
|
return commandResult.explainProcess( useradd, 10 /* bogus timeout */ );
|
||||||
}
|
}
|
||||||
|
|
||||||
pres = CalamaresUtils::System::instance()->targetEnvCommand(
|
commandResult = CalamaresUtils::System::instance()->targetEnvCommand(
|
||||||
{ "usermod", "-aG", defaultGroups, m_userName } );
|
{ "usermod", "-aG", defaultGroups, m_userName } );
|
||||||
if ( pres.getExitCode() )
|
if ( commandResult.getExitCode() )
|
||||||
{
|
{
|
||||||
cError() << "usermod failed" << pres.getExitCode();
|
cError() << "usermod failed" << commandResult.getExitCode();
|
||||||
return pres.explainProcess( "usermod", 10 );
|
return commandResult.explainProcess( "usermod", 10 );
|
||||||
}
|
}
|
||||||
|
|
||||||
QString userGroup = QString( "%1:%2" ).arg( m_userName ).arg( m_userName );
|
QString userGroup = QString( "%1:%2" ).arg( m_userName ).arg( m_userName );
|
||||||
QString homeDir = QString( "/home/%1" ).arg( m_userName );
|
QString homeDir = QString( "/home/%1" ).arg( m_userName );
|
||||||
pres = CalamaresUtils::System::instance()->targetEnvCommand(
|
commandResult = CalamaresUtils::System::instance()->targetEnvCommand(
|
||||||
{ "chown", "-R", userGroup, homeDir } );
|
{ "chown", "-R", userGroup, homeDir } );
|
||||||
if ( pres.getExitCode() )
|
if ( commandResult.getExitCode() )
|
||||||
{
|
{
|
||||||
cError() << "chown failed" << pres.getExitCode();
|
cError() << "chown failed" << commandResult.getExitCode();
|
||||||
return pres.explainProcess( "chown", 10 );
|
return commandResult.explainProcess( "chown", 10 );
|
||||||
}
|
}
|
||||||
|
|
||||||
return Calamares::JobResult::ok();
|
return Calamares::JobResult::ok();
|
||||||
|
Loading…
Reference in New Issue
Block a user