Summary: | Wake on LAN support within net.ethX scripts | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Ryan Phillips (RETIRED) <rphillips> |
Component: | [OLD] baselayout | Assignee: | Roy Marples (RETIRED) <uberlord> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ahbritto, anigel, base-system, gengor, jcabillot, martin.danjou14, martin.hierling, stolz, wschlich |
Priority: | High | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Wake On LAN patch |
Description
Ryan Phillips (RETIRED)
2005-11-29 00:38:49 UTC
lets get wol into the netscripts before we worry about using -i ;) I'm not too sure about integrating ethtool myself - all it's commands would be very system specific, so you might as well do this in /etc/conf.d/net down_eth0="no" # unimplented, but trivial if required postdown() { # Enable WOL for eth0 if [[ ${IFACE} == "eth0" ]]; then ethtool -s "${IFACE}" wol g fi } We could always document that in /etc/conf.d/net.example OR we could do this down_eth0="no" # unimplented, but trivial if required ethtool_eth0="wol g" Easier to configure perhaps, but with the added weight of another module Thoughts? I think the postdown() and down_ethX is much cleaner, and could be more useful. All that is really required by the net scripts is not bringing down the interface. Add a comment in the postdown() method regarding WOL and we should be done. Created attachment 73811 [details, diff]
Wake On LAN patch
This patch adds an example in the postdown function for WOL and adds the
RC_DOWN_INTERFACE variable to /etc/conf.d/rc which is used by net.lo and
shutdown.sh
Wanna test it against baselayout-1.12.0_pre11-r3 ?
Right, 2 people have added themselves to this bug - could either they or the reporter please give some indication whether this patch enables a working WOL or not. I shall try it out It worked fine for me. I tested with the AMD magic packet tool for windows. Applied to our SVN repo - will be in baselayout-1.12.0_pre13 . It worked for me too :), thanks. But instead of using postdown() suggested on the patch, I've used the one from comment #2, because ethtool complains if you try to activate WOL for "lo" ;) BTW,for enabling WoL I used to add the "ethtool -s ethX wol g" at /etc/conf.d/local.stop but it stopped working. Does anyone knowns the reason? (In reply to comment #10) > It worked for me too :), thanks. > > But instead of using postdown() suggested on the patch, I've used the one from > comment #2, because ethtool complains if you try to activate WOL for "lo" ;) OK, example updated to this [[ ${IFACE} != "lo" ]] && ethtool -s "${IFACE}" wol g (In reply to comment #10) > BTW,for enabling WoL I used to add the "ethtool -s ethX wol g" at > /etc/conf.d/local.stop but it stopped working. Does anyone knowns the reason? local gets stopped before net.eth0 - so WOL gets applied by local and then forgotten as net.eth0 takes the interface down. Just a guess ..... Fixed in pre13 Please consider the following comment: 3c59x cards don't appear to work well with ethtool: # ethtool -s eth0 wol g Cannot get current wake-on-lan settings: Operation not supported not setting wol On the other hand, when I use ifconfig eth0 down, I am able to put the adapter in D3 mode (the mode where I can wake up from lan). See this: BEFORE: 00:0f.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 78) ... Status: D0 PME-Enable- DSel=0 DScale=2 PME- # ifconfig eth0 down 00:0f.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 78) ... Status: D3 PME-Enable- DSel=0 DScale=2 PME- Please make sure we can pick either ethtool or ifconfig to put the ethernet card in WOL mode. Thanks. Great ! This new baselayout release allowed me to make wol work. ASUS A8NSLI / skge module. Just had to add ethtool -s eth0 wol g to /etc/conf.d/local.stop Thanks ! *** Bug 143695 has been marked as a duplicate of this bug. *** |