Skip to content

Commit

Permalink
Fixed mac address
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Dec 2, 2021
1 parent 90927bc commit d60365d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions rebuild
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,15 @@ copy_files() {
# Custom banner name
sed -i "s|BOARD_NAME=.*|BOARD_NAME=\"Aml ${AMLOGIC_SOC}\"|g" etc/armbian-release

# Set interfaces
interfaces_file="etc/network/interfaces"
if [ -f "${interfaces_file}" ]; then
mac_hexchars="0123456789ABCDEF"
mac_end=$(for i in {1..6}; do echo -n ${mac_hexchars:$((${RANDOM} % 16)):1}; done | sed -e 's/\(..\)/:\1/g')
random_mac_addr="9E:60:1F${mac_end}"
sed -i "s|hwaddress ether.*|hwaddress ether ${random_mac_addr}|g" ${interfaces_file}
fi

sync

cd ${make_path}
Expand Down

0 comments on commit d60365d

Please sign in to comment.