From 58ff5f69f2d6aebc98cf2f40cc8d6bab80685f0a Mon Sep 17 00:00:00 2001 From: bin456789 Date: Sun, 12 Nov 2023 17:29:15 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E4=BA=91=E9=95=9C=E5=83=8F=E7=A6=81?= =?UTF-8?q?=E7=94=A8=20NoCloud=20=E6=95=B0=E6=8D=AE=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 能防止 cloud-init 使用 sr0 的配置文件 --- cloud-init.yaml | 2 +- trans.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cloud-init.yaml b/cloud-init.yaml index 0baa701..faacaee 100644 --- a/cloud-init.yaml +++ b/cloud-init.yaml @@ -1,5 +1,5 @@ #cloud-config -datasource_list: [NoCloud] +datasource_list: [None] timezone: Asia/Shanghai disable_root: false ssh_pwauth: true diff --git a/trans.sh b/trans.sh index 9d454ef..b9ff7ec 100644 --- a/trans.sh +++ b/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