mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 22:26:42 +00:00
ethtool: rework wakeup handling for WOL devices via udev, thanks to Wintemrute
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
a5c79792b1
commit
a741c69eb8
@ -4,3 +4,6 @@
|
||||
|
||||
mkdir -p $INSTALL/usr/sbin
|
||||
cp $PKG_BUILD/ethtool $INSTALL/usr/sbin
|
||||
|
||||
mkdir -p $INSTALL/lib/udev/rules.d
|
||||
cp $PKG_DIR/udev.d/*.rules $INSTALL/lib/udev/rules.d
|
15
packages/network/ethtool/init.d/14_ethtool → packages/network/ethtool/udev.d/99-wakeup-eth.rules
Executable file → Normal file
15
packages/network/ethtool/init.d/14_ethtool → packages/network/ethtool/udev.d/99-wakeup-eth.rules
Executable file → Normal file
@ -1,5 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# Copyright (C) 2009-2010 OpenELEC.tv
|
||||
# http://www.openelec.tv
|
||||
@ -20,12 +18,11 @@
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
# enable WOL on eth0 and eth1
|
||||
#
|
||||
# runlevels: openelec, textmode
|
||||
ACTION!="add|change", GOTO="end"
|
||||
SUBSYSTEM!="net", GOTO="end"
|
||||
ENV{INTERFACE}!="eth*", GOTO="end"
|
||||
|
||||
. /etc/profile
|
||||
RUN+="/bin/sh -c 'echo enabled >/sys/class/net/$env{INTERFACE}/device/power/wakeup' "
|
||||
RUN+="/usr/sbin/ethtool -s $env{INTERFACE} wol g"
|
||||
|
||||
progress "enable WOL on eth0 and (maybe) eth1"
|
||||
/usr/sbin/ethtool -s eth0 wol g > /dev/null 2>&1 &
|
||||
/usr/sbin/ethtool -s eth1 wol g > /dev/null 2>&1 &
|
||||
LABEL="end"
|
Loading…
x
Reference in New Issue
Block a user