Skip to content
Snippets Groups Projects
Commit 8ad22026 authored by Vinicius Ruoso's avatar Vinicius Ruoso
Browse files

Updated useradd call to never use the default skel


This was creating a lot of unnecessary stuff on specific distributions. So
we are creating a empty directory to use as skel.

Acked-by: default avatarDanilo K. S. Yorinori <danilok@c3sl.ufpr.br>
Signed-off-by: default avatarVinicius Ruoso <vkr07@c3sl.ufpr.br>
parent f16928a7
No related branches found
No related tags found
No related merge requests found
...@@ -55,9 +55,15 @@ verify_md5(){ ...@@ -55,9 +55,15 @@ verify_md5(){
if ! groupadd -fr seed_mec; then if ! groupadd -fr seed_mec; then
abort "falha ao criar o grupo seed_mec." abort "falha ao criar o grupo seed_mec."
fi fi
if ! useradd -rm -g seed_mec -s /bin/bash -d "${SEED_MEC_HOME}" seed_mec; then
# This is a temporary skel directory to avoid installing the default skel
TMPSKEL=$(mktemp -d)
if ! useradd -rm -g seed_mec -s /bin/bash -d "${SEED_MEC_HOME}" \
-k "${TMPSKEL}" seed_mec; then
abort "falha ao criar o usuário seed_mec." abort "falha ao criar o usuário seed_mec."
fi fi
rmdir "${TMPSKEL}"
# Uncompress tar package and check its integrity # Uncompress tar package and check its integrity
tail -n +${BOOTSTRAP_LINES} $0 > "${SEED_MEC_HOME}/${FILE}" tail -n +${BOOTSTRAP_LINES} $0 > "${SEED_MEC_HOME}/${FILE}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment