[X2go-Commits] x2gothinclient.git - build-main (branch) updated: 3331a0057c0ff4a967351911fd0e51c2d2be2d38

X2go dev team git-admin at x2go.org
Thu Jun 30 07:47:57 CEST 2011


The branch, build-main has been updated
       via  3331a0057c0ff4a967351911fd0e51c2d2be2d38 (commit)
       via  13467ff99ffe11ef1d106a636efdb72a0147bc2b (commit)
       via  31edbd9cdd5574432aafe788a47a439a5800accf (commit)
       via  3b08dec260d17a2983bbc0983bb175a9b60f3b3d (commit)
       via  dbc9bdb36ddfd5ebab14cc07e89f74dc138a9bce (commit)
       via  92893bd0ac14c9b7d6288e50f64b450f3daed352 (commit)
       via  940ac2f46b3542afce98981209364860e9b0e47d (commit)
       via  c6a592e5b42a72e76f30c9d48005ee3cad0e676f (commit)
      from  7241e5d56b095bd2986ae6d3ba45b93ab95ebb5b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 debian/changelog                                   |    5 +++
 x2gothinclient/sbin/x2gothinclientd                |   32 +++++++++++++-------
 .../sbin/x2gothinclient_create                     |   10 ++----
 x2gothinclientmanagement/sbin/x2gothinclient_shell |    4 ++
 .../sbin/x2gothinclient_update                     |    3 +-
 .../sbin/x2gothinclient_upgrade                    |   19 ++++++++++--
 .../share/tftpboot/x2go-tce.cfg                    |    4 +-
 7 files changed, 54 insertions(+), 23 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index fd63e63..d6df0d3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -36,6 +36,11 @@ x2gothinclient (1.0.1.3-0~x2go1) UNRELEASED; urgency=low
   * More variable ($) escaping in x2gothinclient_* scripts. Fixes start-stop-daemon
     enable/disable code.
   * Reduce x2goclient CPU load from ~100% to ~0-1%.
+  * Boot TCE kernel with nomodeset boot option to avoid gCard incompatibilities
+    (Fb vs. Xorg). 
+  * Move kernel/initrd symlinks after install rather than copying. 
+  * Add detection of kernel upgrades to x2gothinclient_upgrade script. 
+  * Adapt chroot file created by x2gothinclient_upgrade, escaping $-signs. 
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Sat, 28 May 2011 12:04:34 +0200
 
diff --git a/x2gothinclient/sbin/x2gothinclientd b/x2gothinclient/sbin/x2gothinclientd
index 62f6b2d..63e3984 100755
--- a/x2gothinclient/sbin/x2gothinclientd
+++ b/x2gothinclient/sbin/x2gothinclientd
@@ -20,6 +20,7 @@
 
 
 use strict;
+use IPC::Open3;
 
 sub catch_term
 {
@@ -69,19 +70,18 @@ system("su x2goclient -c \". /etc/x2go/x2gothinclient_init\"");
 my $pid = fork();
 if (not defined $pid) 
 {
-  print "resources not avilable.\n";
+	print "resources not avilable.\n";
 } 
 elsif ($pid != 0) 
 {
-    open (F,">/var/run/x2gothinclient.pid");
-    print F "$pid\n";
-    close(F);
+	open (F,">/var/run/x2gothinclient.pid");
+	print F "$pid\n";
+	close(F);
 }
 elsif ($pid == 0 )
 {
 
 	# silence this daemon script completely...
-	close(STDIN);
 	close(STDOUT);
 	close(STDERR);
 
@@ -91,21 +91,25 @@ elsif ($pid == 0 )
 	{
 
 		# test if XServer is running, if not launch it...
-		if ( check_x() ==0)    
+		if ( check_x() ==0 )
 		{
-			system("/usr/bin/Xorg -br&");
+			system("/usr/bin/Xorg -br &");
 		}
 
 		# test if pulseaudio is running, if not launch it...
-		if ( !check_pulse())
+		if ( !check_pulse() )
 		{
 			system("su - x2goclient -c \"DISPLAY=:0 pulseaudio -D -n -L 'module-native-protocol-tcp port=4713' -L 'module-esound-protocol-tcp port=16001' -L 'module-udev-detect'\"");
 		}
 
 		# test if x2goclient is running, if not launch it...
-		if ( !check_client())
+		my $x2goclient_pid = 0;
+		if ( !check_client() )
 		{
-			qx(su - x2goclient -c \"export DISPLAY=:0; . /etc/x2go/x2gothinclient_start\");
+			local *IN, *OUT, *ERR;
+			$x2goclient_pid = eval {
+				open3( \*IN, \*OUT, \*ERR, "su - x2goclient -c 'DISPLAY=:0 bash -c \"/etc/x2go/x2gothinclient_start &\"'");
+			};
 		}
 
 		# handle availability of the thinshutdown button GUI...
@@ -119,7 +123,13 @@ elsif ($pid == 0 )
 		}
 		if (  !$SHUTD && !$PROXY && $CLIENT)
 		{
-			system("bash -c 'sleep 4; DISPLAY=:0 thinshutdown &'");
+			system("sleep 4; DISPLAY=:0 thinshutdown &");
+		}
+
+		## wait for x2goclient to finish
+		if ( check_client() )
+		{
+			waitpid( $x2goclient_pid, 0 );
 		}
 	}
 }
diff --git a/x2gothinclientmanagement/sbin/x2gothinclient_create b/x2gothinclientmanagement/sbin/x2gothinclient_create
index 5297530..594770e 100755
--- a/x2gothinclientmanagement/sbin/x2gothinclient_create
+++ b/x2gothinclientmanagement/sbin/x2gothinclient_create
@@ -126,11 +126,11 @@ chmod +x /sbin/start-stop-daemon
 [ \$? -eq 0 ] && apt-get install syslinux locales -y
 [ \$? -eq 0 ] && dpkg-reconfigure locales
 [ \$? -eq 0 ] && apt-get install linux-image-486 -y
-[ \$? -eq 0 ] && cp /vmlinuz /vmlinuz.486
-[ \$? -eq 0 ] && cp /initrd.img /initrd.img.486
+[ \$? -eq 0 ] && mv /vmlinuz /vmlinuz.486
+[ \$? -eq 0 ] && mv /initrd.img /initrd.img.486
 [ \$? -eq 0 ] && apt-get install linux-image-686 -y
-[ \$? -eq 0 ] && cp /vmlinuz /vmlinuz.686
-[ \$? -eq 0 ] && cp /initrd.img /initrd.img.686
+[ \$? -eq 0 ] && mv /vmlinuz /vmlinuz.686
+[ \$? -eq 0 ] && mv /initrd.img /initrd.img.686
 [ \$? -eq 0 ] && apt-get install x2gothinclient x2gocdmanager x2gosmartcardrules x2gousbmount -y
 
 # blacklist kernel modules
@@ -175,7 +175,5 @@ rm -f $TC_CHROOT/etc/udev/rules.d/*-persistent-*.rules
 
 x2gothinclient_update
 
-echo
 echo "X2go Thin Client creation has finished successfully."
 echo
-
diff --git a/x2gothinclientmanagement/sbin/x2gothinclient_shell b/x2gothinclientmanagement/sbin/x2gothinclient_shell
index 19c19c5..2712320 100755
--- a/x2gothinclientmanagement/sbin/x2gothinclient_shell
+++ b/x2gothinclientmanagement/sbin/x2gothinclient_shell
@@ -80,6 +80,10 @@ chmod +x /sbin/start-stop-daemon
 
 umount -l /proc &> /dev/null
 umount -l /dev/pts &> /dev/null
+
+echo
+echo "X2go Thin Client Shell has exited."
+echo
 EOF
 chmod u+x "$TC_CHROOT/x2go_tce_shell.sh"
 chroot "$TC_CHROOT" /x2go_tce_shell.sh
diff --git a/x2gothinclientmanagement/sbin/x2gothinclient_update b/x2gothinclientmanagement/sbin/x2gothinclient_update
index d0e78bc..9c0d9f7 100755
--- a/x2gothinclientmanagement/sbin/x2gothinclient_update
+++ b/x2gothinclientmanagement/sbin/x2gothinclient_update
@@ -66,4 +66,5 @@ chmod a+rx "$TC_CHROOT/etc/x2go/x2gothinclient_start"
 cp -v "$TC_CONFIG/x2gothinclient_sessions" "$TC_CHROOT/etc/x2go/x2gothinclient_sessions"
 chmod a+rx "$TC_CHROOT/etc/x2go/x2gothinclient_sessions"
 
-echo
\ No newline at end of file
+echo
+
diff --git a/x2gothinclientmanagement/sbin/x2gothinclient_upgrade b/x2gothinclientmanagement/sbin/x2gothinclient_upgrade
index 6391d0f..2d01390 100755
--- a/x2gothinclientmanagement/sbin/x2gothinclient_upgrade
+++ b/x2gothinclientmanagement/sbin/x2gothinclient_upgrade
@@ -45,7 +45,7 @@ test -e "$TC_CHROOT" || {
     exit -2
 }
 
-cat > "$TC_CHROOT/x2go_tc_update.sh" <<EOF
+cat > "$TC_CHROOT/x2go_tce_upgrade.sh" <<EOF
 #!/bin/bash
 mount /proc &> /dev/null
 mount /dev/pts &> /dev/null
@@ -64,11 +64,24 @@ chmod +x /sbin/start-stop-daemon
 [ \$? -eq 0 ] && apt-get update
 [ \$? -eq 0 ] && apt-get upgrade
 
+# check for kernel upgrades
+for symlink in /vmlinuz /vmlinuz.old /initrd.img /initrd.img.old; do
+    if [ -h \$symlink ]; then
+	symlink_target=\$(ls -l "\$symlink" | awk '{print \$11}')
+	echo \$symlink_target | egrep ".*-486$" >/dev/null && mv \$symlink \${symlink/.old/}.486
+	echo \$symlink_target | egrep ".*-686$" >/dev/null && mv \$symlink \${symlink/.old/}.686
+    fi
+done
+
 # restore start-stop-daemon
 [ \$(stat --format '%s' /sbin/start-stop-daemon) -lt 200 ] && mv /sbin/start-stop-daemon.keep /sbin/start-stop-daemon
 
 umount -l /proc &> /dev/null
 umount -l /dev/pts &> /dev/null
+
+echo
+echo "X2go Thin Client Shell upgrade has finished."
+echo
 EOF
-chmod u+x "$TC_CHROOT/x2go_tc_update.sh"
-chroot "$TC_CHROOT" /x2go_tc_update.sh
+chmod u+x "$TC_CHROOT/x2go_tce_upgrade.sh"
+chroot "$TC_CHROOT" /x2go_tce_upgrade.sh
diff --git a/x2gothinclientmanagement/share/tftpboot/x2go-tce.cfg b/x2gothinclientmanagement/share/tftpboot/x2go-tce.cfg
index fce038d..4bec362 100644
--- a/x2gothinclientmanagement/share/tftpboot/x2go-tce.cfg
+++ b/x2gothinclientmanagement/share/tftpboot/x2go-tce.cfg
@@ -1,8 +1,8 @@
 LABEL x2go-tce-686
         MENU LABEL  X2go ^Thin Client
         KERNEL vmlinuz.686
-        APPEND initrd=initrd.img.686 nfsroot=/opt/x2gothinclient/chroot boot=nfs ro quiet
+        APPEND initrd=initrd.img.686 nfsroot=/opt/x2gothinclient/chroot boot=nfs ro quiet nomodeset
 LABEL x2go-tce-486 
         MENU LABEL  X2go ^Thin Client (old hardware)
         KERNEL vmlinuz.486
-        APPEND initrd=initrd.img.486 nfsroot=/opt/x2gothinclient/chroot boot=nfs ro quiet
+        APPEND initrd=initrd.img.486 nfsroot=/opt/x2gothinclient/chroot boot=nfs ro quiet nomodeset


hooks/post-receive
-- 
x2gothinclient.git (X2go Thin Client Environment)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gothinclient.git" (X2go Thin Client Environment).




More information about the x2go-commits mailing list