2016-09-11 23:20:28 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Reading our private mac
|
|
|
|
here="$(dirname "$0")"
|
|
|
|
mac="$(cat "$here/macaddress")"
|
2017-08-01 15:38:42 +02:00
|
|
|
enp="$(basename /sys/class/net/enp*)"
|
|
|
|
wlp="$(basename /sys/class/net/wlp*)"
|
2016-09-11 23:20:28 +02:00
|
|
|
|
|
|
|
# Setting the MAC address for our wired
|
2017-08-01 15:38:42 +02:00
|
|
|
sudo ip link set "$enp" down
|
|
|
|
sudo ip link set "$enp" address "$mac"
|
|
|
|
sudo ip link set "$enp" up
|
2017-06-23 13:25:14 +02:00
|
|
|
|
|
|
|
# No more wireless
|
2017-08-01 15:38:42 +02:00
|
|
|
sudo ip link set "$wlp" down
|
2017-06-23 13:25:14 +02:00
|
|
|
|