From 38e202f3e0909ce92a421416c271a28c3dd3bf39 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Thu, 19 Sep 2019 10:46:02 +0100 Subject: [PATCH] Tweak randomMac script --- bin/.bin/randomMac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/.bin/randomMac b/bin/.bin/randomMac index 02fb6138..5a6d89f1 100755 --- a/bin/.bin/randomMac +++ b/bin/.bin/randomMac @@ -8,9 +8,9 @@ if [ "$1" != "" ]; then if [ "$(ip link show | grep $1)" != "" ]; then - if [ ! -f ~/mac-address.bck ]; then - echo "storing original information in ~/mac-address.bck" - ip link show > ~/mac-address.bck + if [ ! -f ~/mac-address-$1.bck ]; then + echo "storing original information in ~/mac-address-$1.bck" + ip link show > ~/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/.$//')