summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
authorJonathan Bauer2016-05-19 18:13:38 +0200
committerJonathan Bauer2016-05-19 18:13:38 +0200
commit81b256bf9f6ac208b37ec4fb2a0b854700750fe2 (patch)
tree33b974ecd80b8a3ac4d2896ebbf027fd0859b36f /remote
parent[kernel-vanilla] -> 4.4.10 (diff)
downloadtm-scripts-81b256bf9f6ac208b37ec4fb2a0b854700750fe2.tar.gz
tm-scripts-81b256bf9f6ac208b37ec4fb2a0b854700750fe2.tar.xz
tm-scripts-81b256bf9f6ac208b37ec4fb2a0b854700750fe2.zip
[pvs2] startup scripts for pvsclient & support for external scripts called by pvs2
Diffstat (limited to 'remote')
-rwxr-xr-xremote/modules/pvs2/data/opt/openslx/bin/pvsstartup15
-rwxr-xr-xremote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr2
-rwxr-xr-xremote/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient4
-rw-r--r--remote/modules/pvs2/module.build22
-rw-r--r--remote/modules/pvs2/module.conf6
-rw-r--r--remote/modules/pvs2/module.conf.ubuntu7
6 files changed, 43 insertions, 13 deletions
diff --git a/remote/modules/pvs2/data/opt/openslx/bin/pvsstartup b/remote/modules/pvs2/data/opt/openslx/bin/pvsstartup
new file mode 100755
index 00000000..def24a81
--- /dev/null
+++ b/remote/modules/pvs2/data/opt/openslx/bin/pvsstartup
@@ -0,0 +1,15 @@
+#!/bin/ash
+
+# TODO UNTESTED!
+timediff=5
+while [ $timediff -gt 3 ]; do
+ start="$(date +%s)"
+ pvsclient $@
+ ret=$?
+ end="$(date +%s)"
+ /opt/openslx/pvs2/unlock.sh
+ [ "$ret" == "0" ] && break
+ timediff=$(( end - start ))
+done
+
+
diff --git a/remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr b/remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr
index dedb0995..7a6c13d9 100755
--- a/remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr
+++ b/remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr
@@ -1,4 +1,4 @@
#!/bin/ash
openbox &
-exec /opt/openslx/bin/pvsmgr
+exec /opt/openslx/bin/pvsmgr --manager-only
diff --git a/remote/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient b/remote/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient
index 0ad739e0..86f26a17 100755
--- a/remote/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient
+++ b/remote/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient
@@ -19,8 +19,8 @@ if [ -n "${PVSMGR_SESSION_CMD}" ]; then
fi
# If the ENV var PVS has been set by vmchooser start pvsclient
if [ -n "$PVS_AUTO_CONNECT" -a "$PVS_AUTO_CONNECT" == "TRUE" ]; then
- pvsclient --auto &
+ pvsstartup --auto &
else
- pvsclient &
+ pvsstartup &
fi
exit 0
diff --git a/remote/modules/pvs2/module.build b/remote/modules/pvs2/module.build
index 8277aa1c..70b88350 100644
--- a/remote/modules/pvs2/module.build
+++ b/remote/modules/pvs2/module.build
@@ -5,25 +5,33 @@ fetch_source() {
}
build() {
-
local SRCDIR="${MODULE_DIR}/src/"
- local BUILDDIR="$SRCDIR/build/"
- local DESTDIR="$MODULE_BUILD_DIR/opt/openslx/bin"
+ local BUILDDIR="${SRCDIR}/build/"
+ local DESTDIR="${MODULE_BUILD_DIR}/opt/openslx/bin"
# first activate qt 4
activate_qt 4
- mkdir -p "$DESTDIR" || perror "Could not mkdir $DESTDIR!"
- mkdir -p "$BUILDDIR" || perror "Could not mkdir $BUILDDIR!"
- cd "$BUILDDIR" || perror "Could not cd to $BUILDDIR!"
+ mkdir -p "${DESTDIR}" || perror "Could not mkdir ${DESTDIR}!"
+ mkdir -p "${BUILDDIR}" || perror "Could not mkdir ${BUILDDIR}!"
+ cd "${BUILDDIR}" || perror "Could not cd to ${BUILDDIR}!"
pinfo "Running cmake"
cmake .. || perror "'cmake ..' failed."
pinfo "Running make"
make || perror "'make' failed."
- mv pvsmgr pvsclient $DESTDIR
+ mv pvsmgr pvsclient "${DESTDIR}"
cd - > /dev/null
+ # copy external scripts under 'sample_configuration'
+ mkdir -p "${MODULE_BUILD_DIR}/opt/openslx/pvs2/"
+ if [ -d "${SRCDIR}/sample_configuration" ]; then
+ cp ${SRCDIR}/sample_configuration/*.sh "${MODULE_BUILD_DIR}/opt/openslx/pvs2/" \
+ || perror "Could not copy external scripts to '${MODULE_BUILD_DIR}/opt/openslx/pvs2/'!"
+ chmod +x ${MODULE_BUILD_DIR}/opt/openslx/pvs2/*.sh \
+ || perror "Could not set executable bit for external scripts."
+ fi
+
# needed for copying REQUIRED_CONTENT_PACKAGES to build/
COPYLIST="list_dpkg_output"
[ -e "$COPYLIST" ] && rm "$COPYLIST"
diff --git a/remote/modules/pvs2/module.conf b/remote/modules/pvs2/module.conf
index 9ef50afd..5e7a9a6f 100644
--- a/remote/modules/pvs2/module.conf
+++ b/remote/modules/pvs2/module.conf
@@ -2,6 +2,12 @@ REQUIRED_GIT="git://git.openslx.org/pvs2.git"
REQUIRED_BINARIES="
pvsmgr
pvsclient
+ xinput
+ wmctrl
+"
+REQUIRED_DIRECTORIES="
+ /opt/openslx/pvs2/
+ /usr/lib/
"
REQUIRED_LIBRARIES="
"
diff --git a/remote/modules/pvs2/module.conf.ubuntu b/remote/modules/pvs2/module.conf.ubuntu
index 4dcf2794..8a48ec93 100644
--- a/remote/modules/pvs2/module.conf.ubuntu
+++ b/remote/modules/pvs2/module.conf.ubuntu
@@ -1,11 +1,12 @@
REQUIRED_INSTALLED_PACKAGES="
libqt4-dev
libvncserver-dev
+ xinput
+ wmctrl
"
REQUIRED_CONTENT_PACKAGES="
libqt4-svg
libqtgui4
-"
-REQUIRED_DIRECTORIES="
- /usr/lib/
+ xinput
+ wmctrl
"