mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 09:36:41 +00:00
Use IP address of xcatmaster instead of hostname in resolv.conf (#4537)
This commit is contained in:
parent
4d2e51a61e
commit
f1b21d72a7
@ -4,9 +4,9 @@
|
||||
#---------------------------------------------------------------------------
|
||||
# create an /etc/resolv.conf file on the node
|
||||
#
|
||||
# - this script assumes the nameserver for the node will be
|
||||
# the value of the "xcatmaster" attribute (SN as known by
|
||||
# the node) or the name of the management node as known
|
||||
# - this script assumes the nameserver for the node will be
|
||||
# the value of the "xcatmaster" attribute (SN as known by
|
||||
# the node) or the name of the management node as known
|
||||
# by the node.
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
@ -15,8 +15,8 @@ conf_file="/etc/resolv.conf"
|
||||
conf_file_bak="/etc/resolv.conf.bak"
|
||||
|
||||
# get values set when the myxcatpost_<node> script was run
|
||||
master=$MASTER # this is the ip for the nodes xcatmaster attribute
|
||||
domain=$DOMAIN # this is the domain name used in this cluster
|
||||
master=$MASTER_IP # this is the ip for the nodes xcatmaster attribute
|
||||
domain=$DOMAIN # this is the domain name used in this cluster
|
||||
node=$NODE
|
||||
|
||||
if [ -n "$master" ] && [ -n "$domain" ]; then
|
||||
@ -25,7 +25,7 @@ if [ -n "$master" ] && [ -n "$domain" ]; then
|
||||
cp $conf_file $conf_file_bak > /dev/null 2>&1
|
||||
echo "search $domain" >$conf_file
|
||||
echo "nameserver $master" >>$conf_file
|
||||
else
|
||||
else
|
||||
logger -t xcat -p local4.err "Could not create resolv.conf on $node."
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user