From dae5c07add7abcdea463ee98298a825007106d5d Mon Sep 17 00:00:00 2001 From: spiritLHLS <103393591+spiritLHLS@users.noreply.github.com> Date: Wed, 3 May 2023 17:06:15 +0800 Subject: [PATCH] Update rebuild_qcow2.sh --- back/rebuild_qcow2.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/back/rebuild_qcow2.sh b/back/rebuild_qcow2.sh index 1dddb3a..f0a5308 100644 --- a/back/rebuild_qcow2.sh +++ b/back/rebuild_qcow2.sh @@ -19,13 +19,13 @@ fi # export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1 qcow_file=$1 echo "转换文件$qcow_file中......" -if [[ "$qcow_file" == *"alpine"* ]]; then - virt-sysprep --enable alpine -a "$qcow_file" -elif [[ "$qcow_file" == *"centos"* ]]; then - virt-sysprep --enable centos -a "$qcow_file" -elif [[ "$qcow_file" == *"almalinux"* ]]; then - virt-sysprep --enable almalinux -a "$qcow_file" -fi +# if [[ "$qcow_file" == *"alpine"* ]]; then +# virt-sysprep --enable alpine -a "$qcow_file" +# elif [[ "$qcow_file" == *"centos"* ]]; then +# virt-sysprep --enable centos -a "$qcow_file" +# elif [[ "$qcow_file" == *"almalinux"* ]]; then +# virt-sysprep --enable almalinux -a "$qcow_file" +# fi if [[ "$qcow_file" == *"debian"* || "$qcow_file" == *"ubuntu"* || "$qcow_file" == *"arch"* ]]; then virt-customize -a $qcow_file --run-command "sed -i 's/ssh_pwauth:[[:space:]]*0/ssh_pwauth: 1/g' /etc/cloud/cloud.cfg" virt-customize -a $qcow_file --run-command "echo 'Modified from https://github.com/spiritLHLS/Images' >> /etc/motd"