mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-31 22:47:51 +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
|
mkdir -p $INSTALL/usr/sbin
|
||||||
cp $PKG_BUILD/ethtool $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
|
# Copyright (C) 2009-2010 OpenELEC.tv
|
||||||
# http://www.openelec.tv
|
# http://www.openelec.tv
|
||||||
@ -20,12 +18,11 @@
|
|||||||
# http://www.gnu.org/copyleft/gpl.html
|
# http://www.gnu.org/copyleft/gpl.html
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# enable WOL on eth0 and eth1
|
ACTION!="add|change", GOTO="end"
|
||||||
#
|
SUBSYSTEM!="net", GOTO="end"
|
||||||
# runlevels: openelec, textmode
|
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"
|
LABEL="end"
|
||||||
/usr/sbin/ethtool -s eth0 wol g > /dev/null 2>&1 &
|
|
||||||
/usr/sbin/ethtool -s eth1 wol g > /dev/null 2>&1 &
|
|
Loading…
x
Reference in New Issue
Block a user