mirror of
https://github.com/thelittlerocket/pve.git
synced 2025-03-04 01:38:12 +08:00
Update network.sh
This commit is contained in:
parent
3533c1d590
commit
3783ca3e39
1 changed files with 2 additions and 2 deletions
|
@ -2,8 +2,8 @@
|
||||||
#from https://github.com/spiritLHLS/pve
|
#from https://github.com/spiritLHLS/pve
|
||||||
|
|
||||||
interface=$(lshw -C network | awk '/logical name:/{print $3}' | head -1)
|
interface=$(lshw -C network | awk '/logical name:/{print $3}' | head -1)
|
||||||
ip=$(ip addr show $interface | awk '/inet /{print $2}' | head -1)
|
ip=$(ip addr show $interface | awk '/inet /{print $2}')
|
||||||
netmask=$(ifconfig $interface | awk '/netmask/{print $4}' | head -1)
|
netmask=$(ifconfig $interface | awk '/netmask/{print $4}')
|
||||||
gateway=$(ip route | awk '/default/ {print $3}')
|
gateway=$(ip route | awk '/default/ {print $3}')
|
||||||
cat << EOF | sudo tee /etc/network/interfaces.d/vmbr0.conf
|
cat << EOF | sudo tee /etc/network/interfaces.d/vmbr0.conf
|
||||||
auto vmbr0
|
auto vmbr0
|
||||||
|
|
Loading…
Reference in a new issue