mirror of
https://github.com/bin456789/reinstall.git
synced 2025-12-10 07:28:56 +08:00
core: 云镜像禁用 NoCloud 数据源
能防止 cloud-init 使用 sr0 的配置文件
This commit is contained in:
2
trans.sh
2
trans.sh
@ -895,7 +895,7 @@ create_cloud_init_network_config() {
|
||||
download_cloud_init_config() {
|
||||
os_dir=$1
|
||||
|
||||
ci_file=$os_dir/etc/cloud/cloud.cfg.d/99_nocloud.cfg
|
||||
ci_file=$os_dir/etc/cloud/cloud.cfg.d/99_fallback.cfg
|
||||
download $confhome/cloud-init.yaml $ci_file
|
||||
# 删除注释行,除了第一行
|
||||
sed -i '1!{/^[[:space:]]*#/d}' $ci_file
|
||||
|
||||
Reference in New Issue
Block a user