We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d0d7eb commit d207e04Copy full SHA for d207e04
static/ip.sh
@@ -1,11 +1,9 @@
1
#!/bin/sh
2
3
-# This file is only used if IFACE fail in the startup-script
4
-
5
IFCONFIG="/sbin/ifconfig"
6
INTERFACES="/etc/network/interfaces"
7
8
-IFACE=$(ip -o link show | awk '{print $2,$9}' | grep 'UP' | cut -d ':' -f 1)
+IFACE=$(lshw -c network | grep "logical name" | awk '{print $3; exit}')
9
ADDRESS=$(hostname -I | cut -d ' ' -f 1)
10
NETMASK=$($IFCONFIG | grep -w inet |grep -v 127.0.0.1| awk '{print $4}' | cut -d ":" -f 2)
11
GATEWAY=$(route -n|grep "UG"|grep -v "UGH"|cut -f 10 -d " ")
0 commit comments