Extend network interface auto detection to suppress errors (#4096)

* Extend network interface auto detection to suppress errors

* Remove pointless grep

* Use grep internal limiter instead of head
This commit is contained in:
Igor Pečovnik 2022-08-21 20:36:20 +02:00 committed by GitHub
parent ac5ee4d847
commit 27154e472f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,7 @@
MOTD_DISABLE=""
ONE_WIRE=""
HIDE_IP_PATTERN="^dummy0|^lo"
PRIMARY_INTERFACE="$(ls -1 /sys/class/net/ | grep -v lo | grep -E "enp|eth" | head -1)"
PRIMARY_INTERFACE="$(ls -1 /sys/class/net/ | grep -E "en|eth|wl" -m 1)"
PRIMARY_DIRECTION="rx"
STORAGE=/dev/sda1