mirror of https://github.com/vvzvlad/vestasync
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
258 B
Bash
11 lines
258 B
Bash
1 year ago
|
#!/bin/bash
|
||
|
macs_dir="/mnt/data/etc/vestasync/macs"
|
||
|
|
||
|
for mac_file in "$macs_dir"/*; do
|
||
|
ifname=$(basename "$mac_file")
|
||
|
if [ -f "$mac_file" ]; then
|
||
|
mac_address=$(cat "$mac_file")
|
||
|
ip link set "$ifname" address "$mac_address"
|
||
|
fi
|
||
|
done
|