ifx name filter in wol
This commit is contained in:
1 parent
39d8fb6cc5
commit
a4da995ee1
1 file changed
+5
-1
+5
-1
@@ -10,7 +10,11 @@ else
|
|||||||
printf "Nonsense Input, hostname needed\n"
|
printf "Nonsense Input, hostname needed\n"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
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[@]}
|
echo ${ifx[@]}
|
||||||
for i in ${!ifx[@]}; do
|
for i in ${!ifx[@]}; do
|
||||||
sudo /usr/sbin/etherwake -b -i ${ifx[$i]} $mac
|
sudo /usr/sbin/etherwake -b -i ${ifx[$i]} $mac
|
||||||
|
|||||||
Reference in new issue
Block a user