mirror of
https://github.com/thelittlerocket/pve.git
synced 2025-03-03 17:27:17 +08:00
Update install_pve.sh
This commit is contained in:
parent
92c70a2596
commit
f3490293ec
1 changed files with 8 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
# from
|
||||
# https://github.com/spiritLHLS/pve
|
||||
# 2023.06.22
|
||||
# 2023.06.23
|
||||
|
||||
|
||||
_red() { echo -e "\033[31m\033[01m$@\033[0m"; }
|
||||
|
@ -101,10 +101,14 @@ fi
|
|||
if [[ -f "/etc/network/interfaces.new" && -f "/etc/network/interfaces" ]]; then
|
||||
chattr -i /etc/network/interfaces
|
||||
cp -f /etc/network/interfaces.new /etc/network/interfaces
|
||||
sed -i '/source \/etc\/network\/interfaces\.d\/*/{s/^/#/}' "/etc/network/interfaces"
|
||||
sed -i '/source \/etc\/network\/interfaces\.d\/*/{s/^/#/}' "/etc/network/interfaces.new"
|
||||
chattr +i /etc/network/interfaces
|
||||
fi
|
||||
chattr -i /etc/network/interfaces
|
||||
sed -i '/source \/etc\/network\/interfaces\.d\/*/{s/^/#/}' "/etc/network/interfaces"
|
||||
chattr +i /etc/network/interfaces
|
||||
chattr -i /etc/network/interfaces.new
|
||||
sed -i '/source \/etc\/network\/interfaces\.d\/*/{s/^/#/}' "/etc/network/interfaces.new"
|
||||
chattr +i /etc/network/interfaces.new
|
||||
# 合并文件
|
||||
if [[ -f "/etc/network/interfaces.d/50-cloud-init" && -f "/etc/network/interfaces" ]]; then
|
||||
if [[ ! -f "/etc/network/interfaces" ]]; then
|
||||
|
@ -538,4 +542,4 @@ _green "If the login is correct please do not rush to reboot the system, go to e
|
|||
_green "安装完毕,请打开HTTPS网页 $url"
|
||||
_green "用户名、密码就是服务器所使用的用户名、密码(如root和root用户的密码)"
|
||||
_green "如果登录无误请不要急着重启系统,去执行预配置环境的命令后再重启系统"
|
||||
rm -rf /root/reboot_pve.txt
|
||||
rm -rf /root/reboot_pve.txt
|
||||
|
|
Loading…
Reference in a new issue