linkpi_firmware_history/rootfs/link/shell/setMac2.sh

9 lines
282 B
Bash
Raw Permalink Normal View History

2024-02-15 22:07:50 +01:00
if [ ! -f "/link/config/mac2" ] || [ ! -s /link/config/mac2 ] || [ -z "$(cat /link/config/mac2)" ]; then
2024-02-15 22:07:35 +01:00
/link/shell/makeMac.sh > /dev/null
/link/shell/makeMac.sh > /link/config/mac2
fi
/sbin/ifconfig $1 down
/sbin/ifconfig $1 hw ether `cat /link/config/mac2`
/sbin/ifconfig $1 up