From e63103505ee21ac47a99a16b4f3d2096f79549d7 Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Thu, 26 May 2022 14:27:00 +0200 Subject: Export non standard python path to clients New python requirements of programs running in ogLive clients are shared via samba. Appends this Samba directory to the PYTHONPATH of OpenGnsys clients (ogLive). Specific python versions folder in the OpenGnsys server are located at: /opt/opengnsys/client/lib/pythonX.Y/ X = Major version Y = Minor version This is exposed in the client (ogLive) at: /opt/opengnsys/lib/pythonX.Y/ Clients startup script detects python3 version and exports the correct samba directory. --- client/shared/etc/init/default.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/shared/etc/init/default.sh b/client/shared/etc/init/default.sh index 9022c374..ed5527b9 100755 --- a/client/shared/etc/init/default.sh +++ b/client/shared/etc/init/default.sh @@ -20,6 +20,8 @@ echo "${MSG_LAUNCHCLIENT:-.}" if [ "$ogstatus" != "offline" ]; then GROUP_CONFIG=/opt/opengnsys/ogClient/cfg/${group/ /_}.json + PYMAJMIN=`python3 --version | cut -d" " -f2 | cut -d. -f1,2` + export PYTHONPATH=/opt/opengnsys/lib/python$PYMAJMIN if [ -f $GROUP_CONFIG ]; then /opt/opengnsys/ogClient/./ogclient -c $GROUP_CONFIG else -- cgit v1.2.3-18-g5258