mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-19 04:49:13 +08:00
core: 云镜像 yaml 删除空 dns 节点,避免 cloud-init 报错
This commit is contained in:
parent
f045ca3d41
commit
e5a6877517
3
trans.sh
3
trans.sh
@ -901,6 +901,9 @@ create_cloud_init_network_config() {
|
|||||||
yq -i ".network.config[1].address += [\"$cur\"]" $ci_file
|
yq -i ".network.config[1].address += [\"$cur\"]" $ci_file
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# 如果 network.config[1] 没有 address,则删除,避免低版本 cloud-init 报错
|
||||||
|
yq -i 'del(.network.config[1] | select(has("address") | not))' $ci_file
|
||||||
}
|
}
|
||||||
|
|
||||||
truncate_machine_id() {
|
truncate_machine_id() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user