Skip to content
Snippets Groups Projects
Commit 0a03b488 authored by Bussi Andrea's avatar Bussi Andrea
Browse files

Print either 'user was created' or 'error creating user', but not both.

Otherwise we would get something like this:

  useradd: user 'rdesktop' already exists
  Error creating user rdesktop
  User rdesktop was created
parent 54d3f9ac
No related branches found
No related tags found
No related merge requests found
......@@ -56,8 +56,9 @@ myuseradd() {
useradd -b /local -m ${R_UID} ${R_GID} -r ${R_USER}
if [ $? -ne 0 ]; then
echo "Error creating user ${R_USER}"
else
echo "User ${R_USER} was created"
fi
echo "User ${R_USER} was created"
}
function removeFiles {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment