Commit 8ad22026 authored by Vinicius Ruoso's avatar Vinicius Ruoso

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
......@@ -55,9 +55,15 @@ verify_md5(){
if ! groupadd -fr seed_mec; then
abort "falha ao criar o grupo seed_mec."
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."
fi
rmdir "${TMPSKEL}"
# Uncompress tar package and check its integrity
tail -n +${BOOTSTRAP_LINES} $0 > "${SEED_MEC_HOME}/${FILE}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment