mirror of
https://github.com/thelittlerocket/pve.git
synced 2025-02-01 02:29:01 +08:00
Update build_nat_network.sh
This commit is contained in:
parent
5714f99f6a
commit
99234fcaa3
1 changed files with 7 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
#from https://github.com/spiritLHLS/pve
|
||||
# 2023.06.12
|
||||
# 2023.06.13
|
||||
|
||||
# 打印信息
|
||||
_red() { echo -e "\033[31m\033[01m$@\033[0m"; }
|
||||
|
@ -54,12 +54,12 @@ if [ -f /etc/network/interfaces ]; then
|
|||
fi
|
||||
interfaces_file="/etc/network/interfaces"
|
||||
chattr -i "$interfaces_file"
|
||||
# if ! grep -q "auto lo" "$interfaces_file"; then
|
||||
# echo "auto lo" >> "$interfaces_file"
|
||||
# fi
|
||||
# if ! grep -q "iface lo inet loopback" "$interfaces_file"; then
|
||||
# echo "iface lo inet loopback" >> "$interfaces_file"
|
||||
# fi
|
||||
if ! grep -q "auto lo" "$interfaces_file"; then
|
||||
echo "auto lo" >> "$interfaces_file"
|
||||
fi
|
||||
if ! grep -q "iface lo inet loopback" "$interfaces_file"; then
|
||||
echo "iface lo inet loopback" >> "$interfaces_file"
|
||||
fi
|
||||
if ! grep -q "iface ${interface} inet manual" "$interfaces_file"; then
|
||||
echo "iface ${interface} inet manual" >> "$interfaces_file"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue