diff options
author | Simon Rettberg | 2019-02-19 18:02:09 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-02-19 18:02:09 +0100 |
commit | fa362b2d6777f0466559b9e5ddedf61be8c1278e (patch) | |
tree | 0fafa889dfa7c8929895a211456abc45df453061 | |
parent | [hardware-stats/rootfs-stage32] HI JOEY! (diff) | |
download | mltk-fa362b2d6777f0466559b9e5ddedf61be8c1278e.tar.gz mltk-fa362b2d6777f0466559b9e5ddedf61be8c1278e.tar.xz mltk-fa362b2d6777f0466559b9e5ddedf61be8c1278e.zip |
[etherwake] Enable WOL on every boot
Some systems disable WOL mode on every bootup, so explicitly enable it
again. Note that this is just a software setting, there is usually
another setting in the BIOS that completely disables WOL if desired.
-rw-r--r-- | core/modules/etherwake/module.build | 4 | ||||
-rw-r--r-- | core/modules/etherwake/module.conf | 4 | ||||
-rw-r--r-- | core/modules/etherwake/module.conf.ubuntu | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/core/modules/etherwake/module.build b/core/modules/etherwake/module.build index b84094ff..7012ebf1 100644 --- a/core/modules/etherwake/module.build +++ b/core/modules/etherwake/module.build @@ -8,6 +8,10 @@ build() { COPYLIST="list_dpkg_output" rm -f -- "$COPYLIST" + mkdir -p "${MODULE_BUILD_DIR}/etc/udev/rules.d" + sed "s,%ETHTOOL%,$(which ethtool)," "${MODULE_DIR}/templates/99-enable-wol.rules" > "${MODULE_BUILD_DIR}/etc/udev/rules.d/99-enable-wol.rules" \ + || perror "Cannot write udev rule to enable WOL" + list_packet_files >> "$COPYLIST" tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}" } diff --git a/core/modules/etherwake/module.conf b/core/modules/etherwake/module.conf index 561c0524..5a1b8f6f 100644 --- a/core/modules/etherwake/module.conf +++ b/core/modules/etherwake/module.conf @@ -1,4 +1,8 @@ #!/bin/bash REQUIRED_BINARIES=" etherwake + ethtool +" +REQUIRED_FILES=" + /etc/udev/rules.d/99-enable-wol.rules " diff --git a/core/modules/etherwake/module.conf.ubuntu b/core/modules/etherwake/module.conf.ubuntu index f06c36f8..64a5a04a 100644 --- a/core/modules/etherwake/module.conf.ubuntu +++ b/core/modules/etherwake/module.conf.ubuntu @@ -1,7 +1,9 @@ #!/bin/bash REQUIRED_INSTALLED_PACKAGES=" etherwake + ethtool " REQUIRED_CONTENT_PACKAGES=" etherwake + ethtool " |