summaryrefslogtreecommitdiffstats
path: root/core/modules/etherwake
diff options
context:
space:
mode:
authorSimon Rettberg2019-11-26 11:38:30 +0100
committerSimon Rettberg2019-11-26 11:38:30 +0100
commit446378c911e3939f679ea6d3ec0a5c076f8b4270 (patch)
tree4a603b5e482a7127e613e87c694e26737d68f083 /core/modules/etherwake
parent[vbox-src] add vboxusers group on build-time (diff)
downloadmltk-446378c911e3939f679ea6d3ec0a5c076f8b4270.tar.gz
mltk-446378c911e3939f679ea6d3ec0a5c076f8b4270.tar.xz
mltk-446378c911e3939f679ea6d3ec0a5c076f8b4270.zip
[etherwake] Replace etherwake by jawol
Diffstat (limited to 'core/modules/etherwake')
-rw-r--r--core/modules/etherwake/module.build16
-rw-r--r--core/modules/etherwake/module.conf3
-rw-r--r--core/modules/etherwake/module.conf.ubuntu2
l---------core/modules/etherwake/opt/openslx/sbin/etherwake1
4 files changed, 15 insertions, 7 deletions
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