X-Git-Url: https://hackdaworld.org/gitweb/?p=scripts%2Fscripts.git;a=blobdiff_plain;f=wakeup.sh;fp=wakeup.sh;h=9476a9c79dd083a5258c53f2f79863e14ef25215;hp=0000000000000000000000000000000000000000;hb=79539c1170b037c32b8f9fd69a3b58000edd5366;hpb=6e692ea58e1995f360a2b6263e38ce09f251d2a6 diff --git a/wakeup.sh b/wakeup.sh new file mode 100755 index 0000000..9476a9c --- /dev/null +++ b/wakeup.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# wake up specified host (parse /etc/ethers) + +if [ -z $1 ] ; then + echo + echo "usage: $0 " + echo + exit +fi + +cat /etc/ethers | while read host mac; do + if [ "$1" = "$host" ] ; then + echo -n "waking up $host ($mac) ..." + etherwake $mac + echo " done" + fi +done +