allow predictable network interfaces
on dual-eth-raspi: - eth0 -> end0 - eth1 -> enx...
This commit is contained in:
@@ -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) && \
|
||||
|
||||
Reference in New Issue
Block a user