[X2Go-Commits] [live-build-x2go] 29/29: added support for passing of LDAP parameters

git-admin at x2go.org git-admin at x2go.org
Tue Dec 13 19:39:39 CET 2016


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch feature/mini
in repository live-build-x2go.

commit f495c9f2309242da87069409ffdb9548d9bdcff2
Author: Stefan Baur (BAUR-ITCS) <kontakt at baur-itcs.de>
Date:   Tue Jul 26 08:59:10 2016 +0200

    added support for passing of LDAP parameters
---
 .../lib/live/config/2800-x2go-thinclientconfig     |   37 +++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)

diff --git a/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig
index cdf76c0..6efdc18 100755
--- a/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig
+++ b/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig
@@ -20,8 +20,43 @@ pulseaudio -D -n -L 'module-native-protocol-tcp port=4713' -L 'module-udev-detec
 # Spawn openbox
 openbox &
 
+
+# Get X2GoConfig
+BROKERURL=\$(cat /proc/cmdline | \
+	    tr ' ' '\n' | \
+	    awk -F'=' ' /^broker-url=/ { print \$2 }')
+LDAP=\$(cat /proc/cmdline | \
+	    tr ' ' '\n' | \
+	    sed 's/^ldap=/ldap#/' | \
+	    awk -F'#' ' /^ldap#/ { print \$2 }')
+LDAP1=\$(cat /proc/cmdline | \
+	    tr ' ' '\n' | \
+	    sed 's/^ldap1=/ldap1#/' | \
+	    awk -F'#' ' /^ldap1#/ { print \$2 }')
+LDAP2=\$(cat /proc/cmdline | \
+	    tr ' ' '\n' | \
+	    sed 's/^ldap2=/ldap2#/' | \
+	    awk -F'#' ' /^ldap2#/ { print \$2 }')
+
 # Spawn X2GoClient
-x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --session-conf=/etc/x2go/x2gothinclient_sessions
+if [ -n "\$BROKERURL" ]; then
+	SESSIONFROM="--broker-url=\$BROKERURL"
+else 
+	SESSIONFROM="--session-conf=/etc/x2go/x2gothinclient_sessions"
+fi
+if [ -n "\$LDAP" ] ; then
+	if [ -n "\$LDAP1" ] ; then
+		BACKUPLDAP="--ldap1=\$LDAP1"
+		if [ -n "\$LDAP2" ] ; then
+			BACKUPLDAP="\$BACKUPLDAP --ldap2=\$LDAP2"
+		fi
+	fi
+	LDAPPARAMS="--ldap=\$LDAP \$BACKUPLDAP"
+else
+	LDAPPARAMS=""
+fi
+ 
+x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt \$LDAPPARAMS \$SESSIONFROM
 XSESSION
 
 chown user:user /home/user/.xsession

--
Alioth's /srv/git/code.x2go.org/live-build-x2go.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git


More information about the x2go-commits mailing list