mirror of
https://github.com/thelittlerocket/pve.git
synced 2024-11-15 19:44:38 +08:00
Update network.sh
This commit is contained in:
parent
237527b289
commit
3533c1d590
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ interface=$(lshw -C network | awk '/logical name:/{print $3}' | head -1)
|
|||
ip=$(ip addr show $interface | awk '/inet /{print $2}' | head -1)
|
||||
netmask=$(ifconfig $interface | awk '/netmask/{print $4}' | head -1)
|
||||
gateway=$(ip route | awk '/default/ {print $3}')
|
||||
cat << EOF | sudo tee /etc/network/interfaces.d/vmbr0
|
||||
cat << EOF | sudo tee /etc/network/interfaces.d/vmbr0.conf
|
||||
auto vmbr0
|
||||
iface vmbr0 inet static
|
||||
address $ip
|
||||
|
@ -16,7 +16,7 @@ iface vmbr0 inet static
|
|||
bridge_fd 0
|
||||
EOF
|
||||
|
||||
cat << EOF | sudo tee /etc/network/interfaces.d/vmbr1
|
||||
cat << EOF | sudo tee /etc/network/interfaces.d/vmbr1.conf
|
||||
auto vmbr1
|
||||
iface vmbr1 inet static
|
||||
address 172.16.1.1
|
||||
|
|
Loading…
Reference in a new issue