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,7 +1,12 @@
export EDITOR=nano
echo "-----------------------------------------------------"
echo "Welcome to $HOSTNAME $(hostname -I)"
echo "ethernet addr $(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
echo "ethernet addr $ETHNAME"
function service_status () {
for name in $@; do \
enabled=$(systemctl is-enabled ${name} 2> /dev/null) && \