diff options
author | Simon Rettberg | 2021-07-09 10:18:46 +0200 |
---|---|---|
committer | Simon Rettberg | 2021-07-09 10:18:46 +0200 |
commit | 354f86a826cea87c598a08f022bba903bae7a7a2 (patch) | |
tree | 8faad2fb5e919c4df9e0129258dcf5b2eb17304e /core/modules/etherwake | |
parent | [slxlog] Add module (diff) | |
download | mltk-354f86a826cea87c598a08f022bba903bae7a7a2.tar.gz mltk-354f86a826cea87c598a08f022bba903bae7a7a2.tar.xz mltk-354f86a826cea87c598a08f022bba903bae7a7a2.zip |
[etherwake/idleaction] Try harder to enable WOL
It was reported that WOL is disabled at runtime on some machines, even
though there is a udev rule in place that enables it right when the
interfaces get registered. We can only assume this is a race condition
with adapter initialization, but worst case something else is running
that is interfering with the WOL setting. Now we forcefully re-enable
WOL at boot, every hour, and before standby, for good measure.
Diffstat (limited to 'core/modules/etherwake')
-rw-r--r-- | core/modules/etherwake/data/etc/cron.d/enable-wol | 5 | ||||
-rwxr-xr-x | core/modules/etherwake/data/opt/openslx/scripts/cron-enable_wol | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/core/modules/etherwake/data/etc/cron.d/enable-wol b/core/modules/etherwake/data/etc/cron.d/enable-wol new file mode 100644 index 00000000..bd2fd2d2 --- /dev/null +++ b/core/modules/etherwake/data/etc/cron.d/enable-wol @@ -0,0 +1,5 @@ +SHELL=/bin/ash +PATH=/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/sbin:/opt/openslx/bin + +11 * * * * root /opt/openslx/scripts/cron-enable_wol +@reboot root /opt/openslx/scripts/cron-enable_wol diff --git a/core/modules/etherwake/data/opt/openslx/scripts/cron-enable_wol b/core/modules/etherwake/data/opt/openslx/scripts/cron-enable_wol new file mode 100755 index 00000000..ffa7fbb9 --- /dev/null +++ b/core/modules/etherwake/data/opt/openslx/scripts/cron-enable_wol @@ -0,0 +1,8 @@ +#!/bin/ash + +for i in eth0 boot0; do + [ -e "/sys/class/net/$i" ] || continue + ethtool -s "$i" wol g +done + +exit 0 |