ifx name filter in wol

This commit is contained in:
Lucas Vivo committed 2026-10-03 12:56:09 +02:00
1 parent 39d8fb6cc5
commit a4da995ee1
1 file changed
+5 -1
+5 -1
View File
@@ -10,7 +10,11 @@ else
printf "Nonsense Input, hostname needed\n"
exit 0
fi
mapfile -t ifx < <(ip -o link show | awk -F': ' '{print $2}')
mapfile -t ifx < <(
ip -o link show |
awk -F': ' '{print $2}' |
grep -E '^(eth[0-9]+|en[a-z0-9]+|wlan[0-9]+|wl[a-z0-9]+)$'
)
echo ${ifx[@]}
for i in ${!ifx[@]}; do
sudo /usr/sbin/etherwake -b -i ${ifx[$i]} $mac