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

Added support to update the agent even when inep or proxy files are missing


The new necessity of install the system with an empty inep/proxy had to be
implemented in the update bootstrap. This patch allows the update process to
run properly on a missing inep/proxy system.

Acked-by: default avatarDanilo K. S. Yorinori <danilok@c3sl.ufpr.br>
Signed-off-by: default avatarVinicius Ruoso <vkr07@c3sl.ufpr.br>
parent 60b8ba1c
No related branches found
No related tags found
No related merge requests found
......@@ -88,13 +88,16 @@ cd - &>/dev/null
mkdir -p "${SEED_MEC_HOME}/update/tmp/SEED2-run/client/conf"
# Check if inep and proxy files exist
ERROR=0
INEP_PROXY="${SEED_MEC_HOME}/SEED2/client/conf/inep
${SEED_MEC_HOME}/SEED2/client/conf/proxy"
for FILE in ${INEP_PROXY}; do
test -f "${FILE}" ||
abort "inep and/or proxy file(s) missing, please reinstall the package."
test -f "${FILE}" || ERROR=1
done
# Do nothing if there's no inep or proxy conf files
if test "${ERROR}" -eq 0; then
# Copy inep and proxy to new tree
cp -a "${SEED_MEC_HOME}/SEED2/client/conf/"{inep,proxy} \
"${SEED_MEC_HOME}/update/tmp/SEED2-run/client/conf/"
......@@ -111,6 +114,8 @@ restore_inep_proxy_md5sum
"${SEED_MEC_HOME}/update/tmp/SEED2-run/.backup/client/conf/") ||
restore_inep_proxy_backup
fi
# TODO: do some security backup???
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment