housekeeping - logging for CreateUser Job

This commit is contained in:
bill-auger 2019-11-08 05:38:39 -05:00
parent 17dcc38f3c
commit 344445b437

View File

@ -74,6 +74,8 @@ CreateUserJob::exec()
if ( gs->contains( "sudoersGroup" ) && !gs->value( "sudoersGroup" ).toString().isEmpty() )
{
cDebug() << "[CREATEUSER]: preparing sudoers";
QFileInfo sudoersFi( destDir.absoluteFilePath( "etc/sudoers.d/10-installer" ) );
if ( !sudoersFi.absoluteDir().exists() )
@ -96,6 +98,8 @@ CreateUserJob::exec()
return Calamares::JobResult::error( tr( "Cannot chmod sudoers file." ) );
}
cDebug() << "[CREATEUSER]: preparing groups";
QFileInfo groupsFi( destDir.absoluteFilePath( "etc/group" ) );
QFile groupsFile( groupsFi.absoluteFilePath() );
if ( !groupsFile.open( QIODevice::ReadOnly | QIODevice::Text ) )
@ -141,6 +145,8 @@ CreateUserJob::exec()
}
}
cDebug() << "[CREATEUSER]: creating user";
QStringList useradd { "useradd", "-m", "-U" };
QString shell = gs->value( "userShell" ).toString();
if ( !shell.isEmpty() )