Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#11109 - [initscripts] Support for WOL

Attached to Project: Arch Linux
Opened by Jon Scully (soloport) - Monday, 04 August 2008, 04:20 GMT
Last edited by Aaron Griffin (phrakture) - Thursday, 27 May 2010, 16:56 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Aaron Griffin (phrakture)
Thomas Bächler (brain0)
Architecture All
Severity Low
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: Add support for Wake-on-LAN

Files affected:
* /etc/config.d/wol (add)
* /etc/rc.shutdown
* /etc/rc.d/network

See attached patch file.

ADD /etc/config.d/wol
# Comment out the following line to support Wake On LAN
WOL_ARGS="-i"

# Change to appropriate target device
WOL_DEV=eth0


CHANGE /etc/rc.shutdown:
...
. /etc/conf.d/wol
...
/sbin/poweroff -d -f -h $WOL_ARGS
...

CHANGE /etc/rc.d/network:
...
. /etc/conf.d/wol
...
if [ -n $WOL_ARGS ]; then
/sbin/ifconfig ${1} down >/dev/null 2>&1
else
ethtool -s $WOL_DEV wol g
fi
...
   wol.diff (1.4 KiB)
This task depends upon

Closed by  Aaron Griffin (phrakture)
Thursday, 27 May 2010, 16:56 GMT
Reason for closing:  None
Additional comments about closing:  See comments. No longer an issue / old bug
Comment by Jon Scully (soloport) - Monday, 04 August 2008, 15:27 GMT
Simplified patch.
   wol.diff (1.3 KiB)
Comment by Aaron Griffin (phrakture) - Tuesday, 05 August 2008, 18:41 GMT
One big problem with this patch is that it relies on a binary from a different package, that is not in core, and that is installed in /usr (which will fail if /usr is on a different partition).

Is there anyway this behavior can be accomplished with an rc.d script that is part of the ethtool package? Perhaps if we added a "SHUTDOWN_ARGS" param for arguments to 'poweroff' ?
Comment by Jon Scully (soloport) - Tuesday, 05 August 2008, 18:52 GMT
Good point. Please close. Thanks. (Will push into an AUR package that depends=('ethtool'), etc.)
Comment by Aaron Griffin (phrakture) - Tuesday, 05 August 2008, 18:57 GMT
Well, what I'm saying is - if we need to add things to the rc.shutdown script to not shutdown network interfaces, we can do that part.

I'd rather enable the ability to make a wake-on-lan rc.d script, than include it, for right now
Comment by Jon Scully (soloport) - Tuesday, 05 August 2008, 20:13 GMT
Simpler patch then.

In practice:
* shutdown begins
* /etc/rc.d/network 'down's the interface as normal
* /etc/rc.d/wol re-'up's the device and sets -g option
* shutdown continues

Correct reverse-order in /etc/rc.conf required:
DAEMONS=(syslog-ng wol iptables network...
   wol.diff (0.9 KiB)
Comment by Aaron Griffin (phrakture) - Friday, 08 August 2008, 15:40 GMT
Adding Thomas for comment.

I think I'd rather name it "POWEROFF_ARGS" and add it to the default rc.conf, but I'm not sure if we should have a default value, or keep "-d -f -h" in rc.shutdown

That way, you can make a wol rc.d script much easier
Comment by Thomas Bächler (brain0) - Sunday, 31 May 2009, 10:37 GMT
I just found this and found this is very old, seems we forgot this. However, I don't know what the fuss is all about: I set the wol arguments once when I _boot_ my system, it has nothing to do with setting the interface down - down'ing the interface does not destroy anything. I also needed no extra arguments to poweroff.

I am really really confused what this is about.
Comment by Jon Scully (soloport) - Thursday, 18 June 2009, 02:40 GMT
At one time we found that poweroff '-i' flag impeded wol. Could have been the nic cards we were using -- the cards we use today differ. Purpose of change was to ensure poweroff flags were configurable in rc.conf. (Recommend closing.)
Comment by Thomas Dziedzic (tomd123) - Thursday, 27 May 2010, 04:25 GMT
should we close?

Loading...