mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-19 04:49:13 +08:00
core: 云镜像禁用 NoCloud 数据源
能防止 cloud-init 使用 sr0 的配置文件
This commit is contained in:
parent
a9cd00f7da
commit
58ff5f69f2
@ -1,5 +1,5 @@
|
|||||||
#cloud-config
|
#cloud-config
|
||||||
datasource_list: [NoCloud]
|
datasource_list: [None]
|
||||||
timezone: Asia/Shanghai
|
timezone: Asia/Shanghai
|
||||||
disable_root: false
|
disable_root: false
|
||||||
ssh_pwauth: true
|
ssh_pwauth: true
|
||||||
|
2
trans.sh
2
trans.sh
@ -895,7 +895,7 @@ create_cloud_init_network_config() {
|
|||||||
download_cloud_init_config() {
|
download_cloud_init_config() {
|
||||||
os_dir=$1
|
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
|
download $confhome/cloud-init.yaml $ci_file
|
||||||
# 删除注释行,除了第一行
|
# 删除注释行,除了第一行
|
||||||
sed -i '1!{/^[[:space:]]*#/d}' $ci_file
|
sed -i '1!{/^[[:space:]]*#/d}' $ci_file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user