From 28c5f3454af393b6f32340da03c6cf95fc771ff5 Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Wed, 24 May 2023 14:01:22 +0800 Subject: [PATCH] Update install_pve.sh --- scripts/install_pve.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/install_pve.sh b/scripts/install_pve.sh index 8abbfd4..5897749 100644 --- a/scripts/install_pve.sh +++ b/scripts/install_pve.sh @@ -78,6 +78,7 @@ cdn_urls=("https://cdn.spiritlhl.workers.dev/" "https://cdn3.spiritlhl.net/" "ht check_cdn_file # cloud-init文件修改 +rebuild_cloud_init(){ if [ -f "/etc/cloud/cloud.cfg" ]; then chattr -i /etc/cloud/cloud.cfg if grep -q "preserve_hostname: true" "/etc/cloud/cloud.cfg"; then @@ -94,6 +95,8 @@ if [ -f "/etc/cloud/cloud.cfg" ]; then fi chattr +i /etc/cloud/cloud.cfg fi +} +rebuild_cloud_init # /etc/hosts文件修改 ip=$(curl -s ipv4.ip.sb) @@ -255,6 +258,7 @@ install_required_modules() { done } install_required_modules +rebuild_cloud_init # 打印内核 running_kernel=$(uname -r)