mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-11-11 16:09:16 +00:00
Regen MAC when setting up a new Rock64
This commit is contained in:
parent
8d3fc8d465
commit
bfb00f1536
|
@ -341,6 +341,18 @@ systemctl enable tor
|
|||
systemctl enable invalid_block_check
|
||||
|
||||
|
||||
# Regenerate MAC Address for Rock64
|
||||
if [ $IS_ROCK64 = 1 ]; then
|
||||
. /usr/lib/armbian/armbian-common
|
||||
CONNECTION="$(nmcli -f UUID,ACTIVE,DEVICE,TYPE connection show --active | tail -n1)"
|
||||
UUID=$(awk -F" " '/ethernet/ {print $1}' <<< "${CONNECTION}")
|
||||
get_random_mac
|
||||
nmcli connection modify $UUID ethernet.cloned-mac-address $MACADDR
|
||||
nmcli connection modify $UUID -ethernet.mac-address ""
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Delete junk
|
||||
rm -rf /home/admin/download
|
||||
rm -rf /home/admin/.bash_history
|
||||
|
|
Loading…
Reference in New Issue
Block a user