diff --git a/xCAT-server/share/xcat/install/scripts/post.rh b/xCAT-server/share/xcat/install/scripts/post.rh index 6ac2f5d7c..fbf8a2214 100644 --- a/xCAT-server/share/xcat/install/scripts/post.rh +++ b/xCAT-server/share/xcat/install/scripts/post.rh @@ -30,11 +30,7 @@ then dhclient eth0 IP=$(ifconfig $PRINIC | grep inet | awk '{print $2}' | awk -F: '{print $2}') fi -echo "search #TABLE:site:key=domain:value#" >/etc/resolv.conf -for i in $(echo #TABLE:site:key=nameservers:value# | tr ',' ' ') -do - echo "nameserver $i" -done >>/etc/resolv.conf + export HOSTNAME=$(host $IP 2>/dev/null | awk '{print $5}' | awk -F. '{print $1}') hostname $HOSTNAME #