From 3ea6c6cfbec8d303a6ebe1dba2e154091e0fd43c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 21 Feb 2019 06:40:49 -0500 Subject: [PATCH] [users] Rename badly-named variable --- src/modules/users/CreateUserJob.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/modules/users/CreateUserJob.cpp b/src/modules/users/CreateUserJob.cpp index 052af87c6..d7e356231 100644 --- a/src/modules/users/CreateUserJob.cpp +++ b/src/modules/users/CreateUserJob.cpp @@ -154,29 +154,29 @@ CreateUserJob::exec() useradd << "-c" << m_fullName; useradd << m_userName; - auto pres = CalamaresUtils::System::instance()->targetEnvCommand( useradd ); - if ( pres.getExitCode() ) + auto commandResult = CalamaresUtils::System::instance()->targetEnvCommand( useradd ); + if ( commandResult.getExitCode() ) { - cError() << "useradd failed" << pres.getExitCode(); - return pres.explainProcess( useradd, 10 /* bogus timeout */ ); + cError() << "useradd failed" << commandResult.getExitCode(); + return commandResult.explainProcess( useradd, 10 /* bogus timeout */ ); } - pres = CalamaresUtils::System::instance()->targetEnvCommand( + commandResult = CalamaresUtils::System::instance()->targetEnvCommand( { "usermod", "-aG", defaultGroups, m_userName } ); - if ( pres.getExitCode() ) + if ( commandResult.getExitCode() ) { - cError() << "usermod failed" << pres.getExitCode(); - return pres.explainProcess( "usermod", 10 ); + cError() << "usermod failed" << commandResult.getExitCode(); + return commandResult.explainProcess( "usermod", 10 ); } QString userGroup = QString( "%1:%2" ).arg( m_userName ).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 } ); - if ( pres.getExitCode() ) + if ( commandResult.getExitCode() ) { - cError() << "chown failed" << pres.getExitCode(); - return pres.explainProcess( "chown", 10 ); + cError() << "chown failed" << commandResult.getExitCode(); + return commandResult.explainProcess( "chown", 10 ); } return Calamares::JobResult::ok();