From fa362b2d6777f0466559b9e5ddedf61be8c1278e Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 19 Feb 2019 18:02:09 +0100 Subject: [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. --- core/modules/etherwake/module.build | 4 ++++ core/modules/etherwake/module.conf | 4 ++++ core/modules/etherwake/module.conf.ubuntu | 2 ++ 3 files changed, 10 insertions(+) (limited to 'core/modules/etherwake') 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 " -- cgit v1.2.3-55-g7522