From 2949d4d0e6d34fc7f8524f092d5ef63cdc612c1c Mon Sep 17 00:00:00 2001 From: bin456789 Date: Sun, 23 Jul 2023 11:48:10 +0800 Subject: [PATCH] =?UTF-8?q?redhat:=20=E4=BF=AE=E5=A4=8D=20fedora=20cloud-i?= =?UTF-8?q?nit=20=E9=85=8D=E7=BD=AE=E4=B8=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trans.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/trans.sh b/trans.sh index e3f2f7d..22b7a64 100644 --- a/trans.sh +++ b/trans.sh @@ -395,6 +395,7 @@ if is_use_cloud_image; then dd if=/dev/nbd0 of=/first-1M bs=1M count=1 # 将1M之后 dd到硬盘 + # shellcheck disable=SC2194 case 3 in 1) # BusyBox dd @@ -428,7 +429,11 @@ if is_use_cloud_image; then os_part=$(lsblk /dev/sda*[0-9] --sort SIZE -o NAME | tail -1) mkdir -p /os mount /dev/$os_part /os - download $confhome/nocloud.yaml /os/etc/cloud/cloud.cfg.d/99_nocloud.cfg + if [ "$distro" = fedora ]; then + subvol=/root + fi + # shellcheck disable=SC2154 + download $confhome/nocloud.yaml /os$subvol/etc/cloud/cloud.cfg.d/99_nocloud.cfg exit else # 挂载主分区