network_shares_automount/sbin/wakecmd

13 lines
356 B
Plaintext
Raw Permalink Normal View History

#!/bin/sh
mac="$1"
host="$2"
# create colon separated mac address for ether-wake
macSep=${mac:0:2}:${mac:2:2}:${mac:4:2}:${mac:6:2}:${mac:8:2}:${mac:10:2}
echo "Attempting to wake $host ($mac)"
#send 5 wake up packets using 2 methods to be sure!
for i in 1 2 3 4 5; do
/mod/sbin/wakeonlan "$mac" "$host"
/mod/bin/busybox/ether-wake $macSep
sleep 1
done