From 82001efc3cf088cb34541499d4df68966ba59b87 Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Wed, 24 May 2023 13:24:56 +0800 Subject: [PATCH] Update install_pve.sh --- scripts/install_pve.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/install_pve.sh b/scripts/install_pve.sh index aa146f9..8b10e5c 100644 --- a/scripts/install_pve.sh +++ b/scripts/install_pve.sh @@ -80,12 +80,12 @@ check_cdn_file # /etc/hosts文件修改 if [ -f "/etc/cloud/cloud.cfg" ]; then chattr -i /etc/cloud/cloud.cfg - if grep -q "preserve_hostname" "/etc/cloud/cloud.cfg"; then - sed -E -i 's/preserve_hostname:[[:space:]]*false/preserve_hostname: true/g' "/etc/cloud/cloud.cfg" - echo "change preserve_hostname to true" - else - echo "preserve_hostname is true" - fi +# if grep -q "preserve_hostname" "/etc/cloud/cloud.cfg"; then + sed -E -i 's/preserve_hostname:[[:space:]]*false/preserve_hostname: true/g' "/etc/cloud/cloud.cfg" + echo "change preserve_hostname to true" +# else +# echo "preserve_hostname is true" +# fi chattr +i /etc/cloud/cloud.cfg else echo "can not find /etc/cloud/cloud.cfg"