diff options
author | Simon Rettberg | 2017-02-24 14:53:58 +0100 |
---|---|---|
committer | root | 2017-02-24 14:53:58 +0100 |
commit | 046c087940593090a795dd72acea30e6563d9d4c (patch) | |
tree | 694afded6737d7b53ace737afea60cc5c8ea60fa /core/modules/speedcheck | |
parent | Merge branch 'master' of github.com:OpenSLX/mltk (diff) | |
download | mltk-046c087940593090a795dd72acea30e6563d9d4c.tar.gz mltk-046c087940593090a795dd72acea30e6563d9d4c.tar.xz mltk-046c087940593090a795dd72acea30e6563d9d4c.zip |
[speedcheck] New module
Diffstat (limited to 'core/modules/speedcheck')
-rwxr-xr-x | core/modules/speedcheck/data/opt/openslx/bin/image_speedcheck | 6 | ||||
-rw-r--r-- | core/modules/speedcheck/module.build | 25 | ||||
-rw-r--r-- | core/modules/speedcheck/module.conf | 3 | ||||
-rw-r--r-- | core/modules/speedcheck/module.conf.debian | 4 | ||||
-rw-r--r-- | core/modules/speedcheck/module.conf.opensuse | 4 | ||||
-rw-r--r-- | core/modules/speedcheck/module.conf.ubuntu | 4 |
6 files changed, 46 insertions, 0 deletions
diff --git a/core/modules/speedcheck/data/opt/openslx/bin/image_speedcheck b/core/modules/speedcheck/data/opt/openslx/bin/image_speedcheck new file mode 100755 index 00000000..b556ff22 --- /dev/null +++ b/core/modules/speedcheck/data/opt/openslx/bin/image_speedcheck @@ -0,0 +1,6 @@ +#!/bin/bash + +FILE=$(find /mnt/vmstore -type f -printf "%s\t%p\n" | sort -n | tail -n 1 | awk '{print $2}') + +exec speedcheck "$FILE" + diff --git a/core/modules/speedcheck/module.build b/core/modules/speedcheck/module.build new file mode 100644 index 00000000..c98ae1ff --- /dev/null +++ b/core/modules/speedcheck/module.build @@ -0,0 +1,25 @@ + +fetch_source() { + git clone "${REQUIRED_GIT}" "${MODULE_WORK_DIR}/src" +} + +build() { + local SRCDIR="${MODULE_WORK_DIR}/src/" + + [ ! -d "${MODULE_BUILD_DIR}/${REQUIRED_PREFIX}" ] && mkdir -p "${MODULE_BUILD_DIR}/${REQUIRED_PREFIX}" + cd "${MODULE_BUILD_DIR}/${REQUIRED_PREFIX}" + + pinfo "Running cmake" + # use qt4-dev (in case eg. qt4 and 5 are installed) + activate_qt 4 + + cmake "$SRCDIR" || perror "'cmake $SRCDIR' failed." + make || perror "'make' failed." + + cd - > /dev/null +} + +post_copy() { + : +} + diff --git a/core/modules/speedcheck/module.conf b/core/modules/speedcheck/module.conf new file mode 100644 index 00000000..bafa3662 --- /dev/null +++ b/core/modules/speedcheck/module.conf @@ -0,0 +1,3 @@ +REQUIRED_GIT="git://git.openslx.org/openslx-ng/speedcheck.git" +REQUIRED_PREFIX="/opt/openslx/bin" +REQUIRED_BINARIES="speedcheck" diff --git a/core/modules/speedcheck/module.conf.debian b/core/modules/speedcheck/module.conf.debian new file mode 100644 index 00000000..2953ac63 --- /dev/null +++ b/core/modules/speedcheck/module.conf.debian @@ -0,0 +1,4 @@ +REQUIRED_INSTALLED_PACKAGES=" + cmake + libqt4-dev +" diff --git a/core/modules/speedcheck/module.conf.opensuse b/core/modules/speedcheck/module.conf.opensuse new file mode 100644 index 00000000..75cb7dd6 --- /dev/null +++ b/core/modules/speedcheck/module.conf.opensuse @@ -0,0 +1,4 @@ +REQUIRED_INSTALLED_PACKAGES=" + cmake + libqt4-devel +" diff --git a/core/modules/speedcheck/module.conf.ubuntu b/core/modules/speedcheck/module.conf.ubuntu new file mode 100644 index 00000000..2953ac63 --- /dev/null +++ b/core/modules/speedcheck/module.conf.ubuntu @@ -0,0 +1,4 @@ +REQUIRED_INSTALLED_PACKAGES=" + cmake + libqt4-dev +" |