Update network.sh

This commit is contained in:
spiritLHLS 2023-02-24 10:02:10 +08:00 committed by GitHub
parent 3533c1d590
commit 3783ca3e39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,8 +2,8 @@
#from https://github.com/spiritLHLS/pve
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)
ip=$(ip addr show $interface | awk '/inet /{print $2}')
netmask=$(ifconfig $interface | awk '/netmask/{print $4}')
gateway=$(ip route | awk '/default/ {print $3}')
cat << EOF | sudo tee /etc/network/interfaces.d/vmbr0.conf
auto vmbr0