mirror of
https://github.com/vvzvlad/vestasync.git
synced 2024-11-05 06:49:11 +03:00
11 lines
258 B
Bash
11 lines
258 B
Bash
#!/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
|