Trigger wakeonlan upon xbmc resume
#1
Hi,

I have xbmc live 9.11 (r26018) installed and running on ASRock HTPC with all media shared from another pc that is running Windows Home Server (WHS). On week days I am usually out of town so I have configured my WHS to auto standby after certain period of inactivity. My HTPC as well goes into standby and not complete power off.

Now, I would like to have my HTPC send a wakeonlan command to WHS upon resume. I have added following command in /etc/rc.local which is not helping:
Quote:wakeonlan <WHS MAC Address>

If I manually type this command in a shell then my WHS does respond and wake up but no response via /etc/rc.local file. I am not much familiar with linux environment and still in the learning stages. I would appreciate if you could tell me what I am doing wrong here and how can I fix it?

Appreciate your response,
xbmc fan Nod
Reply
#2
Hello
I try to make the same thing.
I write : "sudo ethtool -s eth0 wol g" in the /etc/rc.local just before the "exit 0" line.
Do not let space beetwen the line.
Then you can test it by use wakeonlan xx:xx:xx:xx:xx:xx

A+XAV
Reply
#3
XavHorneT Wrote:Hello
I try to make the same thing.
I write : "sudo ethtool -s eth0 wol g" in the /etc/rc.local just before the "exit 0" line.
Do not let space beetwen the line.
Then you can test it by use wakeonlan xx:xx:xx:xx:xx:xx

A+XAV

I think that rc.local is only executed on startup... not on wake from sleep.
The correct place to put this would be in a script in: /etc/pm/sleep.d

And it would look something like this:
Quote:#!/bin/sh

case "$1" in
thaw|resume)
/usr/bin/wakeonlan <WHS MAC Address>
;;
*) exit $NA
;;
esac
Reply
#4
Thanks Big Grin

I'll try your tips as soon as I get back home Nod
ASRock ION-330HT | xbmc Live Dharma [v10.1] | Confluence
Reply
#5
Thanks wunderdrug. Inserting "wakeonlan" command within /etc/pm/sleep.d did the trick. And you were right, rc.local does not get triggered upon resume.
ASRock ION-330HT | xbmc Live Dharma [v10.1] | Confluence
Reply
#6
Can someone write out a more specific step-by-step to do this?

I have followed the instructions but the solution outlined does not work in waking up my home server.
Reply
#7
Ronald Pagan Wrote:Can someone write out a more specific step-by-step to do this?

I have followed the instructions but the solution outlined does not work in waking up my home server.

I made a bit of a walkthrough here:

http://forum.xbmc.org/showthread.php?tid=99123 Look at post #3
Reply

Logout Mark Read Team Forum Stats Members Help
Trigger wakeonlan upon xbmc resume0