Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #8987: call rudder-uuidgen in rudder agent check #92

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 2 additions & 6 deletions share/commands/agent-check
Expand Up @@ -37,10 +37,6 @@ done
# after the sourcing.
set -e

# Ensure our PATH includes Rudder's bin dir (for uuidgen on AIX in particular)
PATH=/opt/rudder/bin/:$PATH
export PATH

# Variables
BACKUP_DIR=/var/backups/rudder/

Expand Down Expand Up @@ -173,7 +169,7 @@ check_and_fix_rudder_uuid() {
echo " Done"
else
printf "WARNING: The UUID of the node does not exist and no backup exist. A new one will be generated..."
uuidgen > ${UUID_FILE}
/opt/rudder/bin/rudder-uuidgen > ${UUID_FILE}
echo " Done"
fi
else
Expand All @@ -187,7 +183,7 @@ check_and_fix_rudder_uuid() {
mkdir -p "${BACKUP_DIR}"
cp -f /opt/rudder/etc/uuid.hive ${BACKUP_DIR}/uuid-`date +%Y%m%d`.hive
# Generate a new one
uuidgen > ${UUID_FILE}
/opt/rudder/bin/rudder-uuidgen > ${UUID_FILE}
echo " Done."
fi
fi
Expand Down