diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index d5ce595b7..31cbbbcbf 100644 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -755,6 +755,9 @@ sub mkinstall # I don't need the timeout for ubuntu, but for debian there is a problem with getting dhcp in a timely manner $kcmdline .= " netcfg/dhcp_timeout=120"; + # safer way to set hostname, avoid problems with nameservers + $kcmdline .= " hostname=".$node; + $bptab->setNodeAttribs( $node, { diff --git a/xCAT-server/share/xcat/install/scripts/post.ubuntu b/xCAT-server/share/xcat/install/scripts/post.ubuntu index 8317f9730..3e32d4712 100644 --- a/xCAT-server/share/xcat/install/scripts/post.ubuntu +++ b/xCAT-server/share/xcat/install/scripts/post.ubuntu @@ -25,8 +25,6 @@ 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 # # Run xCAT post install #