summaryrefslogtreecommitdiffstats
path: root/remote/modules/pvs2
diff options
context:
space:
mode:
authorJonathan Bauer2016-01-26 15:24:30 +0100
committerJonathan Bauer2016-01-26 15:24:30 +0100
commit5ecb382b83beb84b9e68d676c84e4dcd8485c6b3 (patch)
treeab6314c12336e99295839ecb8f7ca4e9f43f5023 /remote/modules/pvs2
parentMerge branch 'master' of git.openslx.org:openslx-ng/tm-scripts (diff)
downloadtm-scripts-5ecb382b83beb84b9e68d676c84e4dcd8485c6b3.tar.gz
tm-scripts-5ecb382b83beb84b9e68d676c84e4dcd8485c6b3.tar.xz
tm-scripts-5ecb382b83beb84b9e68d676c84e4dcd8485c6b3.zip
[pvs2] adapted the sessionstart.d/ file for pvs2 to the new changes vmchooser2
now evaluates the env variable "SESSION_CMD" to get the session command that was executed and compares it with the Exec= String from the pvs2mgr.desktop file
Diffstat (limited to 'remote/modules/pvs2')
-rwxr-xr-xremote/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient19
1 files changed, 11 insertions, 8 deletions
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 c3e99a81..0ad739e0 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
@@ -1,18 +1,21 @@
#!/bin/ash
-# detect name of the PVS-Manager session by looking at the xsession file
-# check old path...
-PVS_SESSION_NAME=
-PVS_XSESSION_FILE="pvs2mgr.desktop"
+# SESSION_TYPE can be either 'VSESSION' or 'XSESSION' - currently not evaluated
+
+# detect session command of the PVS-Manager session by looking at the xsession file
+PVSMGR_SESSION_CMD=
+PVSMGR_XSESSION_FILE="pvs2mgr.desktop"
+# the second directory should not be needed, but lets be compatible with the old crap......
for DIR in "/usr/share/xsessions" "/opt/openslx/xsessions/"; do
- if [ -f "${DIR}/${PVS_XSESSION_FILE}" ]; then
- PVS_SESSION_NAME="$(grep -E "^Name=.*$" "${DIR}/${PVS_XSESSION_FILE}" |cut -c 6-)"
+ if [ -f "${DIR}/${PVSMGR_XSESSION_FILE}" ]; then
+ # extract the exact command string
+ PVSMGR_SESSION_CMD="$(grep -E "^Exec=.*$" "${DIR}/${PVSMGR_XSESSION_FILE}" |cut -c 6-)"
break
fi
done
-if [ -n "$PVS_SESSION_NAME" ]; then
+if [ -n "${PVSMGR_SESSION_CMD}" ]; then
# do not start pvsclient if we are running the pvs manager session
- [ "x${SESSION_NAME}" == "x${PVS_SESSION_NAME}" ] && exit 0
+ [ "x${SESSION_CMD}" == "x${PVSMGR_SESSION_CMD}" ] && exit 0
fi
# If the ENV var PVS has been set by vmchooser start pvsclient
if [ -n "$PVS_AUTO_CONNECT" -a "$PVS_AUTO_CONNECT" == "TRUE" ]; then