2016-09-11 23:20:28 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Reading our private mac
|
|
|
|
here="$(dirname "$0")"
|
|
|
|
mac="$(cat "$here/macaddress")"
|
2016-10-21 10:34:10 +02:00
|
|
|
link="$(ip link | grep enp | tr -d ' ' | cut -d: -f2)"
|
2016-09-11 23:20:28 +02:00
|
|
|
|
|
|
|
# Setting the MAC address for our wired
|
2016-10-21 10:34:10 +02:00
|
|
|
sudo ip link set "$link" down
|
|
|
|
sudo ip link set "$link" address "$mac"
|
|
|
|
sudo ip link set "$link" up
|