dynamic interface name
This commit is contained in:
parent
42c6134445
commit
f7a4eea2a5
@ -3,8 +3,9 @@
|
|||||||
# Reading our private mac
|
# Reading our private mac
|
||||||
here="$(dirname "$0")"
|
here="$(dirname "$0")"
|
||||||
mac="$(cat "$here/macaddress")"
|
mac="$(cat "$here/macaddress")"
|
||||||
|
link="$(ip link | grep enp | tr -d ' ' | cut -d: -f2)"
|
||||||
|
|
||||||
# Setting the MAC address for our wired
|
# Setting the MAC address for our wired
|
||||||
sudo ip link set enp5s0u1u4 down
|
sudo ip link set "$link" down
|
||||||
sudo ip link set enp5s0u1u4 address "$mac"
|
sudo ip link set "$link" address "$mac"
|
||||||
sudo ip link set enp5s0u1u4 up
|
sudo ip link set "$link" up
|
||||||
|
Loading…
Reference in New Issue
Block a user