ethtool: don't enable wakeup when unsupported

This commit is contained in:
MilhouseVH 2017-07-16 22:17:17 +01:00
parent 84c946dec4
commit 89448f0e4f

View File

@ -21,7 +21,7 @@ ACTION!="add|change", GOTO="end"
SUBSYSTEM!="net", GOTO="end"
ENV{INTERFACE}!="eth*", GOTO="end"
RUN+="/bin/sh -c 'echo enabled >/sys/class/net/$env{INTERFACE}/device/power/wakeup' "
TEST=="/sys/class/net/$env{INTERFACE}/device/power/wakeup", RUN+="/bin/sh -c 'echo enabled >/sys/class/net/$env{INTERFACE}/device/power/wakeup'"
RUN+="/usr/sbin/ethtool -s $env{INTERFACE} wol g"
LABEL="end"