Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh -e
- ifconfig eth0 down
- MAC_tmp=$(grep -E "MacAddress=" /sys/class/i2c-dev/i2c-0/device/0-0050/eeprom)
- echo "Mac Line: $MAC_tmp"
- MAC=$( echo $MAC_tmp | sed 's|MacAddress=||' )
- if [ -z "$MAC" ]; then
- MAC="02:90:00:a0:90:90"
- echo "Couldnt read Mac Address, falling back to emergency Mac: $MAC"
- fi
- echo "Setting up eth0 with MAC: $MAC"
- ifconfig eth0 hw ether $MAC up
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement