Skip to content
Snippets Groups Projects
Commit a35bcdd8 authored by Erik Alexandre Pucci's avatar Erik Alexandre Pucci
Browse files

buildpackage: Remove any previous installation of the agent


This allows the reinstallation to work even in systems where groupadd(8) and
useradd(8) have no "-f" option.

Signed-off-by: default avatarErik Alexandre Pucci <eap08@c3sl.ufpr.br>
Acked-by: default avatarAryane Ast dos Santos <aras10@c3sl.ufpr.br>
parent 66850353
Branches
No related tags found
No related merge requests found
...@@ -153,6 +153,11 @@ LOGFILE=/tmp/collected-information.log ...@@ -153,6 +153,11 @@ LOGFILE=/tmp/collected-information.log
# Save stdout to file descriptor 3 and redirect all output to $LOGFILE # Save stdout to file descriptor 3 and redirect all output to $LOGFILE
exec 3>&1 &> ${LOGFILE} exec 3>&1 &> ${LOGFILE}
# Remove any previous installation of the agent
rm -rf "${AGENT_DIR}"
/usr/sbin/userdel -r seed_mec
/usr/sbin/groupdel seed_mec
# Create seed_mec group and exit on error (except by the error of previous # Create seed_mec group and exit on error (except by the error of previous
# existence of seed_mec group) # existence of seed_mec group)
if ! /usr/sbin/groupadd -f seed_mec; then if ! /usr/sbin/groupadd -f seed_mec; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment