mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-01-07 08:52:32 +00:00
Fix for using resolvable name as conserver
confetty was being told to connect via IP even if local, as it was comparing a name to ip addresses directly. Correct by using getent to assure it is an ip address first.
This commit is contained in:
@@ -87,6 +87,9 @@ if [ $USE_CONFLUENT == "1" ] && ([ -x "/opt/confluent/bin/confetty" ] || [ -x "/
|
||||
fi
|
||||
if [ -z "$CONSERVER" ]; then
|
||||
CONSERVER=`nodels $1 nodehm.conserver 2>/dev/null | awk -F: '{print $2}' | tr -d ' '`
|
||||
if [ ! -z "$CONSERVER" ]; then
|
||||
CONSERVER=$(getent hosts $CONSERVER|awk '{print $1}')
|
||||
fi
|
||||
declare -a ipaddrs=`ip -o a | awk {'print $4'} | cut -d/ -f1 | grep -v : | tr '\n' ' '`
|
||||
for IP in ${ipaddrs[*]}; do
|
||||
if [[ "${CONSERVER}" == "${IP}" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user