From b357ae0a6bd573a754f49a2b9c9e5fd5f988db35 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Tue, 1 Aug 2017 15:38:42 +0200 Subject: [PATCH] down the wifi when I connect with cable --- local/bin/macspoofer.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/local/bin/macspoofer.sh b/local/bin/macspoofer.sh index 8b15837..b14c078 100755 --- a/local/bin/macspoofer.sh +++ b/local/bin/macspoofer.sh @@ -3,13 +3,15 @@ # Reading our private mac here="$(dirname "$0")" mac="$(cat "$here/macaddress")" -link="$(basename /sys/class/net/enp*)" +enp="$(basename /sys/class/net/enp*)" +wlp="$(basename /sys/class/net/wlp*)" # Setting the MAC address for our wired -sudo ip link set "$link" down -sudo ip link set "$link" address "$mac" -sudo ip link set "$link" up +sudo ip link set "$enp" down +sudo ip link set "$enp" address "$mac" +sudo ip link set "$enp" up # No more wireless sudo sv stop wpa_supplicant +sudo ip link set "$wlp" down