summaryrefslogtreecommitdiffstats
path: root/abs/core/supplemental-web/wakeonlan.sh
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-12-22 15:56:19 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-12-22 15:56:19 (GMT)
commitcd795551be430c3d398b0b80e3d9c91820aaed61 (patch)
tree772aba1d2c98b82e54ce84c275e790a203f37054 /abs/core/supplemental-web/wakeonlan.sh
parent5489ad014713fbbd42f3b577b29e21b2cd0585fa (diff)
downloadlinhes_pkgbuild-cd795551be430c3d398b0b80e3d9c91820aaed61.zip
linhes_pkgbuild-cd795551be430c3d398b0b80e3d9c91820aaed61.tar.gz
linhes_pkgbuild-cd795551be430c3d398b0b80e3d9c91820aaed61.tar.bz2
supplemental_web: fix wakeonlan.sh to account for the change in mac address location in xymon, also added etherwake.
Diffstat (limited to 'abs/core/supplemental-web/wakeonlan.sh')
-rw-r--r--abs/core/supplemental-web/wakeonlan.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/abs/core/supplemental-web/wakeonlan.sh b/abs/core/supplemental-web/wakeonlan.sh
index 1213f79..7734401 100644
--- a/abs/core/supplemental-web/wakeonlan.sh
+++ b/abs/core/supplemental-web/wakeonlan.sh
@@ -1,12 +1,17 @@
#!/bin/bash
-HWADDR=`curl -s http://localhost/xymon/hobbit-cgi/svcstatus.sh?CLIENT=$1|grep HWaddr|tr -s [:space:]| cut -d" " -f5|uniq`
-
-#for mac in `grep HW "$DIR/$FILE" |awk '{ print $5 } '`
+echo "Wake on lan attempt for $1"
+HWADDR=`curl -s http://localhost/xymon/hobbit-cgi/svcstatus.sh?CLIENT=$1|grep ether|grep txq|tr -s [:space:]| cut -d" " -f3|uniq`
for mac in $HWADDR
do
- echo "/usr/bin/wol -v $mac"
- /usr/bin/wol -v $mac
+ echo
+ echo "####################################################"
+ echo "wol: $mac"
+ /usr/bin/wol -v $mac
+ echo
+ echo "etherwake: $mac "
+ sudo /usr/sbin/etherwake -D $mac 2>&1
+ echo "####################################################"
done
-
+