From 446378c911e3939f679ea6d3ec0a5c076f8b4270 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 26 Nov 2019 11:38:30 +0100 Subject: [etherwake] Replace etherwake by jawol --- core/modules/etherwake/module.build | 16 ++++++++++++---- core/modules/etherwake/module.conf | 3 ++- core/modules/etherwake/module.conf.ubuntu | 2 -- core/modules/etherwake/opt/openslx/sbin/etherwake | 1 + 4 files changed, 15 insertions(+), 7 deletions(-) create mode 120000 core/modules/etherwake/opt/openslx/sbin/etherwake diff --git a/core/modules/etherwake/module.build b/core/modules/etherwake/module.build index 7012ebf1..d9648025 100644 --- a/core/modules/etherwake/module.build +++ b/core/modules/etherwake/module.build @@ -1,19 +1,27 @@ #!/bin/bash fetch_source() { - : + autoclone } build() { - COPYLIST="list_dpkg_output" - rm -f -- "$COPYLIST" + local SRCDIR="${MODULE_WORK_DIR}/src/jawol" + pinfo "Building jawol" + cde "$SRCDIR" + make || perror "make failed" + mkdir -p "$MODULE_BUILD_DIR/opt/openslx/sbin" + cp jawol "$MODULE_BUILD_DIR/opt/openslx/sbin" || perror "cp failed" + + cde "$MODULE_BUILD_DIR" 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" + local COPYLIST="list_dpkg_output" + rm -f -- "$COPYLIST" list_packet_files >> "$COPYLIST" - tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}" + tarcopy "$( < "$COPYLIST" sort -u )" "${MODULE_BUILD_DIR}" } post_copy() { diff --git a/core/modules/etherwake/module.conf b/core/modules/etherwake/module.conf index 5a1b8f6f..c5d351bc 100644 --- a/core/modules/etherwake/module.conf +++ b/core/modules/etherwake/module.conf @@ -1,6 +1,7 @@ #!/bin/bash +REQUIRED_GIT="https://git.openslx.org/openslx-ng/jawol.git" REQUIRED_BINARIES=" - etherwake + jawol ethtool " REQUIRED_FILES=" diff --git a/core/modules/etherwake/module.conf.ubuntu b/core/modules/etherwake/module.conf.ubuntu index 64a5a04a..b6507973 100644 --- a/core/modules/etherwake/module.conf.ubuntu +++ b/core/modules/etherwake/module.conf.ubuntu @@ -1,9 +1,7 @@ #!/bin/bash REQUIRED_INSTALLED_PACKAGES=" - etherwake ethtool " REQUIRED_CONTENT_PACKAGES=" - etherwake ethtool " diff --git a/core/modules/etherwake/opt/openslx/sbin/etherwake b/core/modules/etherwake/opt/openslx/sbin/etherwake new file mode 120000 index 00000000..25b69dbb --- /dev/null +++ b/core/modules/etherwake/opt/openslx/sbin/etherwake @@ -0,0 +1 @@ +jawol \ No newline at end of file -- cgit v1.2.3-55-g7522