mirror of
https://github.com/thelittlerocket/pve.git
synced 2024-11-13 10:38:05 +08:00
Update install_pve.sh
This commit is contained in:
parent
77127a7f9f
commit
255f7ffee3
1 changed files with 13 additions and 0 deletions
|
@ -290,6 +290,19 @@ if [ -f "/etc/network/interfaces" ]; then
|
|||
fi
|
||||
chattr +i /etc/network/interfaces
|
||||
fi
|
||||
# 检测回环是否存在
|
||||
if ! grep -q "auto lo" "/etc/network/interfaces"; then
|
||||
chattr -i /etc/network/interfaces
|
||||
echo "auto lo" >> "/etc/network/interfaces"
|
||||
chattr +i /etc/network/interfaces
|
||||
_blue "Can not find 'auto lo' in /etc/network/interfaces, add it"
|
||||
fi
|
||||
if ! grep -q "iface lo inet loopback" "/etc/network/interfaces"; then
|
||||
chattr -i /etc/network/interfaces
|
||||
echo "iface lo inet loopback" >> "/etc/network/interfaces"
|
||||
chattr +i /etc/network/interfaces
|
||||
_blue "Can not find 'iface lo inet loopback' in /etc/network/interfaces, add it"
|
||||
fi
|
||||
# 反加载
|
||||
if [[ -f "/etc/network/interfaces.new" && -f "/etc/network/interfaces" ]]; then
|
||||
chattr -i /etc/network/interfaces.new
|
||||
|
|
Loading…
Reference in a new issue