Commit 1fb5a150 by tingweiwang

Update machine-init.sh 主机名改为覆盖而不是追加

1 parent 59cbcf41
Showing with 3 additions and 3 deletions
...@@ -64,7 +64,7 @@ sleep 2 ...@@ -64,7 +64,7 @@ sleep 2
base base
echo "设置本机主机名" echo "设置本机主机名"
hostname seetaas-cpu-$end_ip hostname seetaas-cpu-$end_ip
echo "seetaas-cpu-$end_ip" >>/etc/hostname echo "seetaas-cpu-$end_ip" >/etc/hostname
echo "设置本机hosts" echo "设置本机hosts"
echo "$local_ip seetaas-cpu-$end_ip" >>/etc/hosts echo "$local_ip seetaas-cpu-$end_ip" >>/etc/hosts
echo "执行挂载数据盘操作" echo "执行挂载数据盘操作"
...@@ -76,7 +76,7 @@ gpu() { ...@@ -76,7 +76,7 @@ gpu() {
base base
echo "设置本机主机名" echo "设置本机主机名"
hostname seetaas-gpu-$end_ip hostname seetaas-gpu-$end_ip
echo "seetaas-gpu-$end_ip" >>/etc/hostname echo "seetaas-gpu-$end_ip" >/etc/hostname
echo "设置本机hosts" echo "设置本机hosts"
echo "$local_ip seetaas-gpu-$end_ip" >>/etc/hosts echo "$local_ip seetaas-gpu-$end_ip" >>/etc/hosts
echo "执行挂载数据盘操作" echo "执行挂载数据盘操作"
...@@ -87,7 +87,7 @@ storage() { ...@@ -87,7 +87,7 @@ storage() {
base base
echo "设置本机主机名" echo "设置本机主机名"
hostname seetaas-storage-$end_ip hostname seetaas-storage-$end_ip
echo "seetaas-storage-$end_ip" >>/etc/hostname echo "seetaas-storage-$end_ip" >/etc/hostname
echo "设置本机hosts" echo "设置本机hosts"
echo "$local_ip seetaas-storage-$end_ip" >>/etc/hosts echo "$local_ip seetaas-storage-$end_ip" >>/etc/hosts
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!