Signed-off-by: Wang Yong wangyong0117@qq.com --- lib/bootstrap.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/bootstrap.sh b/lib/bootstrap.sh index 76f07e6a7..52c9da32a 100755 --- a/lib/bootstrap.sh +++ b/lib/bootstrap.sh @@ -273,6 +273,9 @@ setup_hosts() { is_docker && return
+ suffix="sh.intel.com" + [ -n "${CCI_SRC}" ] && suffix="compass-ci.net" + # /etc/hosts may be shared when it's NFSROOT and there is no obvious # way to detect if rootfs is already RAM based. So unconditionally # symlink it to my own tmpfs copy. @@ -283,8 +286,8 @@ setup_hosts() else cp /etc/hosts $tmpfs_hosts fi - echo "127.0.0.1 $HOSTNAME.sh.intel.com $HOSTNAME" >> $tmpfs_hosts - echo "::1 $HOSTNAME.sh.intel.com $HOSTNAME" >> $tmpfs_hosts + echo "127.0.0.1 $HOSTNAME.${suffix} $HOSTNAME" >> $tmpfs_hosts + echo "::1 $HOSTNAME.${suffix} $HOSTNAME" >> $tmpfs_hosts ln -fs $tmpfs_hosts /etc/hosts }