Fixes backup of mac address

master
Jonathan Hodgson 5 years ago
parent 9d1f14c19d
commit 5edc6c6a3a
  1. 2
      bin/.bin/randomMac

@ -10,7 +10,7 @@ if [ "$1" != "" ]; then
if [ "$(ip link show | grep $1)" != "" ]; then
if [ ! -f ~/mac-address-$1.bck ]; then
echo "storing original information in ~/mac-address-$1.bck"
ip link show > ~/mac-address-$1.bck
ip link show $1 > ~/mac-address-$1.bck
fi
sudo ip link set dev $1 down
sudo ip link set dev $1 address $(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')

Loading…
Cancel
Save