allow predictable network interfaces

on dual-eth-raspi:
- eth0 -> end0
- eth1 -> enx...
This commit is contained in:
2025-06-27 16:02:38 +02:00
committed by l_samenv
parent fe95372127
commit ab195cc90f
5 changed files with 40 additions and 14 deletions

View File

@@ -1,4 +1,8 @@
ETHNAME=$(cat /sys/class/net/eth0/address)
if [[ -f /sys/class/net/eth0/address ]]; then
ETHNAME=$(cat /sys/class/net/eth0/address)
else
ETHNAME=$(cat /sys/class/net/end0/address)
fi
FOUND=($(grep -l -r MAC=$ETHNAME /home/l_samenv/boxtools/cfg))
if [ -z "$FOUND" ]; then
BOXID=${ETHNAME//:/}