mirror of
https://github.com/thelittlerocket/pve.git
synced 2025-02-01 02:29:01 +08:00
Update install_pve.sh
This commit is contained in:
parent
82001efc3c
commit
a0ee033f40
1 changed files with 6 additions and 6 deletions
|
@ -80,12 +80,12 @@ check_cdn_file
|
||||||
# /etc/hosts文件修改
|
# /etc/hosts文件修改
|
||||||
if [ -f "/etc/cloud/cloud.cfg" ]; then
|
if [ -f "/etc/cloud/cloud.cfg" ]; then
|
||||||
chattr -i /etc/cloud/cloud.cfg
|
chattr -i /etc/cloud/cloud.cfg
|
||||||
# if grep -q "preserve_hostname" "/etc/cloud/cloud.cfg"; then
|
if grep -q "preserve_hostname: true" "/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
|
||||||
# else
|
sed -E -i 's/preserve_hostname:[[:space:]]*false/preserve_hostname: true/g' "/etc/cloud/cloud.cfg"
|
||||||
# echo "preserve_hostname is true"
|
echo "change preserve_hostname to true"
|
||||||
# fi
|
fi
|
||||||
chattr +i /etc/cloud/cloud.cfg
|
chattr +i /etc/cloud/cloud.cfg
|
||||||
else
|
else
|
||||||
echo "can not find /etc/cloud/cloud.cfg"
|
echo "can not find /etc/cloud/cloud.cfg"
|
||||||
|
|
Loading…
Reference in a new issue