[X2go-Commits] x2goserver.git - release/3.1.1.x (branch) updated: 3.1.1.6-5-ga9ddc03

X2Go dev team git-admin at x2go.org
Mon Nov 12 12:57:49 CET 2012


The branch, release/3.1.1.x has been updated
       via  a9ddc031895260e40e099417c15e32cd9d73a03d (commit)
       via  e8d7700258f72ee991460b709a5f27ec2bdf8bce (commit)
       via  ac44ee30911caecbde4d4b255c3df636400692d3 (commit)
       via  8ee633875ac5a916f7d060c3e518b69d0ff6073a (commit)
       via  5213ce605d9abaacf576e2df52891c047f2a8e1d (commit)
      from  623a4649daca7f1489b3441f44f24f5f58db2cfa (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 -----------------------------------------------------------------
commit a9ddc031895260e40e099417c15e32cd9d73a03d
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Nov 12 12:56:59 2012 +0100

    changelog cleanup

commit e8d7700258f72ee991460b709a5f27ec2bdf8bce
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Nov 12 10:03:35 2012 +0100

    Detect GNOME and UNITY startup commands via DISTRIB_RELEASE version number and by using the bc command for comparing versions.

commit ac44ee30911caecbde4d4b255c3df636400692d3
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Nov 12 09:49:46 2012 +0100

    syntax fix

commit 8ee633875ac5a916f7d060c3e518b69d0ff6073a
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Nov 12 09:30:59 2012 +0100

    Use DISTRIB_RELEASE to query Ubuntu release versions and detect Unity launch command.

commit 5213ce605d9abaacf576e2df52891c047f2a8e1d
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Nov 12 12:54:50 2012 +0100

    Do not fail if source_environment() cannot find the file to be sourced.

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog                  |   11 +++++++++++
 debian/control                    |    1 +
 x2goserver/bin/x2gomountdirs      |    2 +-
 x2goserver/bin/x2goruncommand     |   19 +++++++++++--------
 x2goserver/bin/x2goumount-session |    2 +-
 5 files changed, 25 insertions(+), 10 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 6055676..bf93f75 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+x2goserver (3.1.1.7-0~x2go1) UNRELEASED; urgency=low
+
+  * New upstream+bugfix release (3.1.1.7):
+    - Use DISTRIB_RELEASE to query Ubuntu release versions and detect Unity launch
+      command.
+    - Detect GNOME and UNITY startup commands via DISTRIB_RELEASE version number
+      and by using the bc command for comparing versions.
+    - Do not fail if source_environment() cannot find the file to be sourced.
+
+ -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Wed, 12 Nov 2012 09:28:32 +0100
+
 x2goserver (3.1.1.6-0~x2go1) unstable; urgency=low
 
   * Bugfix release (3.1.1.6):
diff --git a/debian/control b/debian/control
index ba29b5a..f242c27 100644
--- a/debian/control
+++ b/debian/control
@@ -20,6 +20,7 @@ Depends:
  ${misc:Depends},
  x2goagent (>= 2:3.5.0.15-0~),
  lsof,
+ bc,
  openssh-client,
  openssh-server,
  libconfig-simple-perl,
diff --git a/x2goserver/bin/x2gomountdirs b/x2goserver/bin/x2gomountdirs
index 457a1d3..8436219 100755
--- a/x2goserver/bin/x2gomountdirs
+++ b/x2goserver/bin/x2gomountdirs
@@ -38,7 +38,7 @@ sub source_environment {
     my $name = shift;
 
     open my $fh, "<", $name
-        or die "could not open $name: $!";
+        or return -1;
 
     while (<$fh>) {
         chomp;
diff --git a/x2goserver/bin/x2goruncommand b/x2goserver/bin/x2goruncommand
index d26fa82..b7e0246 100755
--- a/x2goserver/bin/x2goruncommand
+++ b/x2goserver/bin/x2goruncommand
@@ -91,14 +91,14 @@ fi
 if [ "$cmd" == "GNOME" ] || [ "$cmd" == "gnome-session" ]; then
 
 	cmd="/usr/bin/gnome-session"
-	if [ "$DISTRIB_ID" == "Ubuntu" ] && echo "$DISTRIB_CODENAME" | egrep "^[a-m].*" >/dev/null; then
-		export DESKTOP_SESSION="gnome"
-	elif [ "$DISTRIB_ID" == "Ubuntu" ] && echo "$DISTRIB_CODENAME" | egrep "^n.*" >/dev/null; then
-		export DESKTOP_SESSION="2d-gnome"
-		args=" --session=$DESKTOP_SESSION"
-	elif [ "$DISTRIB_ID" == "Ubuntu" ] && echo "$DISTRIB_CODENAME" | egrep -v "^[a-n].*" >/dev/null; then
+	if [ "$DISTRIB_ID" == "Ubuntu" ] && $(echo $DISTRIB_RELEASE >= 11.10 | bc); then
 		export DESKTOP_SESSION="gnome-fallback"
 		args=" --session=$DESKTOP_SESSION"
+	elif [ "$DISTRIB_ID" == "Ubuntu" ] && $(echo $DISTRIB_RELEASE == 11.04 | bc); then
+		export DESKTOP_SESSION="2d-gnome"
+		args=" --session=$DESKTOP_SESSION"
+	elif [ "$DISTRIB_ID" == "Ubuntu" ] && $(echo $DISTRIB_RELEASE <= 10.10 | bc); then
+		export DESKTOP_SESSION="gnome"
 	elif cat /etc/debian_version | egrep "^(squeeze|6\.).*" >/dev/null; then
 		export DESKTOP_SESSION="gnome"
 	elif cat /etc/debian_version | egrep "^(wheezy|7\.).*" >/dev/null; then
@@ -108,10 +108,13 @@ if [ "$cmd" == "GNOME" ] || [ "$cmd" == "gnome-session" ]; then
 
 elif ([ "$cmd" == "UNITY" ] || [ "$cmd" == "unity" ]); then
 	cmd="/usr/bin/gnome-session"
-	if [ "$DISTRIB_ID" == "Ubuntu" ] && echo "$DISTRIB_CODENAME" | egrep -v "^[a-n].*" >/dev/null; then
+	if [ "$DISTRIB_ID" == "Ubuntu" ] && $(echo $DISTRIB_RELEASE >= 12.10 | bc); then
+		export DESKTOP_SESSION="ubuntu"
+		args=" --session=$DESKTOP_SESSION"
+	elif [ "$DISTRIB_ID" == "Ubuntu" ] && [ $(echo $DISTRIB_RELEASE == 11.10 | bc) || $(echo $DISTRIB_RELEASE == 12.04 | bc) ]; then
 		export DESKTOP_SESSION="ubuntu-2d"
 		args=" --session=$DESKTOP_SESSION"
-	elif [ "$DISTRIB_ID" == "Ubuntu" ] && echo "$DISTRIB_CODENAME" | egrep -v "^n.*" >/dev/null; then
+	elif [ "$DISTRIB_ID" == "Ubuntu" ] && $(echo $DISTRIB_RELEASE == 11.04 | bc); then
 		export DESKTOP_SESSION="2d-ubuntu"
 		args=" --session=$DESKTOP_SESSION"
 	fi
diff --git a/x2goserver/bin/x2goumount-session b/x2goserver/bin/x2goumount-session
index ca52174..33ffc01 100755
--- a/x2goserver/bin/x2goumount-session
+++ b/x2goserver/bin/x2goumount-session
@@ -41,7 +41,7 @@ sub source_environment {
     my $name = shift;
 
     open my $fh, "<", $name
-        or die "could not open $name: $!";
+        or return -1;
 
     while (<$fh>) {
         chomp;


hooks/post-receive
-- 
x2goserver.git (X2Go Server)

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 "x2goserver.git" (X2Go Server).




More information about the x2go-commits mailing list