Subject: Bug#414: xinitrd.d path wrong in Xsession

From: Orion Poplawski <[email-masked]>
Date: Mon, 27 Jan 2014 11:17:49 -0700

Package: x2goserver
Version: 4.0.1.13
Tags: patch

The path to xinitrd.d is wrong in Xsession.  Also, add some
existence/readability checking.

-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       [email-masked]
Boulder, CO 80301                   http://www.nwra.com
diff -up x2goserver-4.0.1.13/x2goserver-xsession/etc/Xsession.xinit x2goserver-4.0.1.13/x2goserver-xsession/etc/Xsession
--- x2goserver-4.0.1.13/x2goserver-xsession/etc/Xsession.xinit	2014-01-27 10:41:21.249243220 -0700
+++ x2goserver-4.0.1.13/x2goserver-xsession/etc/Xsession	2014-01-27 10:45:49.541668747 -0700
@@ -174,8 +174,8 @@ elif [ -f /etc/redhat-release ]; then
 	unset XKB_IN_USE
 
 	# run all system xinitrc shell scripts.
-	for file in /etc/x2go/xinit/xinitrc.d/* ; do
-		. $file
+	for file in /etc/x2go/xinitrc.d/* ; do
+		[ -r "$file" ] && . $file
 	done
 
 	# Prefix launch of session with ssh-agent if available and not already running.