Skip to content

Commit

Permalink
Fixes #17933: rudder agent health fails on aix
Browse files Browse the repository at this point in the history
  • Loading branch information
peckpeck committed Jul 9, 2020
1 parent 1b37a89 commit ae22acc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion share/commands/agent-health
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ fi

# test policy server value if it's not an ip
if ! grep -E "^[0-9.]+$|^[0-9a-fA-F:]+$" "${CFE_DIR}/policy_server.dat">/dev/null; then
cat "${CFE_DIR}/policy_server.dat" | xargs getent hosts > /dev/null
if type getent >/dev/null 2>/dev/null; then
cat "${CFE_DIR}/policy_server.dat" | xargs getent hosts > /dev/null
else
cat "${CFE_DIR}/policy_server.dat" | xargs host > /dev/null 2> /dev/null
fi
if [ $? -ne 0 ]
then
echo "Unknown Rudder policy server"
Expand Down

0 comments on commit ae22acc

Please sign in to comment.