Commit 663cf17b authored by Erik Alexandre Pucci's avatar Erik Alexandre Pucci

{pre,post}inst: Modified to use the PROINFODATA installer

Signed-off-by: default avatarErik Alexandre Pucci <eap08@c3sl.ufpr.br>
Acked-by: default avatarAryane Ast dos Santos <aras10@c3sl.ufpr.br>
parent a874ec99
......@@ -24,6 +24,9 @@
SEED_MEC_HOME="/opt/seed_mec"
BACKUP_DIR="/opt/seed_mec_backup"
# Install the PROINFODATA agent
bash /tmp/agent.run
# Check if there is a backup for the inep and proxy files and restore it
if test -f "${BACKUP_DIR}/SEED2/client/conf/inep"; then
# Restore the inep and proxy files, and also their backup and md5sum
......@@ -46,9 +49,6 @@ fi
# Make sure the owner of ~seed_mec is seed_mec
chown -R seed_mec:seed_mec "${SEED_MEC_HOME}"
# Run the agent for the first time
su -c "bash ${SEED_MEC_HOME}/SEED2/agent.sh" seed_mec
# Remove seed_mec from the KDM user list
kwriteconfig --file /etc/kde4/kdm/kdmrc --group X-*-Greeter \
--key HiddenUsers seed_mec
......
......@@ -32,27 +32,6 @@ BKP_BKPCONF="${BKP}/SEED2/.backup/client/conf/"
BKP_MD5CONF="${BKP}/SEED2/.md5sum/client/conf/"
BKP_MD5BKPCONF="${BKP}/SEED2/.md5sum/.backup/client/conf/"
# This function shows some error message and aborts execution
abort() {
printf "error: fatal: $1\n"
exit 1
}
# Create seed_mec group
if ! groupadd -f seed_mec; then
abort "error while creating the group seed_mec."
fi
# Create seed_mec user
mkdir -p ${SEED_MEC_HOME}
TMPSKEL=$(mktemp -d)
if ! useradd -r -m -g seed_mec -s /bin/bash -d "${SEED_MEC_HOME}" \
-k "${TMPSKEL}" seed_mec; then
abort "error while creating the user seed_mec."
fi
rmdir ${TMPSKEL}
# Check if there is a previously configured INEP and no backup before creating
# the backup for both the inep and proxy files
if test -f "${CONF}/inep" -a ! -f "${BKP_CONF}/inep"; then
......
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