[X2Go-Commits] [x2goserver] 01/01: Don't die if no session state file is found, as it will break X2Go completely after upgrading from versions << 4.0.1.16 if sessions are still running/suspended during package upgrade.

git-admin at x2go.org git-admin at x2go.org
Fri Jun 27 20:27:38 CEST 2014


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

x2go pushed a commit to branch release/4.0.1.x
in repository x2goserver.

commit 6fbfa38e12ba83eef2f7172e3bb536d8e390c4e4
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Jun 27 20:23:19 2014 +0200

    Don't die if no session state file is found, as it will break X2Go completely after upgrading from versions << 4.0.1.16 if sessions are still running/suspended during package upgrade.
---
 debian/changelog                      |    3 +++
 x2goserver/bin/x2golistsessions       |    3 ++-
 x2goserver/sbin/x2gocleansessions     |    3 ++-
 x2goserver/sbin/x2golistsessions_root |    3 ++-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 25a91ad..4d2c6c6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -43,6 +43,9 @@ x2goserver (4.0.1.16-0x2go1) UNRELEASED; urgency=low
       them in.
     - Correctly use diversions from stderr to stdout in shell commands.
       (Fixes: #520).
+    - Don't die if no session state file is found, as it will break X2Go
+      completely after upgrading from versions << 4.0.1.16 if sessions
+      are still running/suspended during package upgrade.
   * debian/control, x2goserver.spec:
     + Update versioned D: x2goagent (>= 3.5.0.25). This assures that X2Go
       works with poly-instantiated /tmp directories.
diff --git a/x2goserver/bin/x2golistsessions b/x2goserver/bin/x2golistsessions
index d62250b..bee2b13 100755
--- a/x2goserver/bin/x2golistsessions
+++ b/x2goserver/bin/x2golistsessions
@@ -75,7 +75,8 @@ sub get_agent_state
 	my $stateFile = "/tmp/.x2go-".$user."/C-".$sess."/state";
 	if (! -e $stateFile )
 	{
-		die "state file not exists: $stateFile\n";
+		print "WARNING: state file for session $sess does not exists: $stateFile\n";
+		$state="UNKNOWN";
 	}
 	else
 	{
diff --git a/x2goserver/sbin/x2gocleansessions b/x2goserver/sbin/x2gocleansessions
index 91b9e35..eb2562d 100755
--- a/x2goserver/sbin/x2gocleansessions
+++ b/x2goserver/sbin/x2gocleansessions
@@ -93,7 +93,8 @@ sub get_agent_state
 	my $stateFile = "/tmp/.x2go-".$user."/C-".$sess."/state";
 	if (! -e $stateFile )
 	{
-		die "state file not exists: $stateFile\n";
+		print "WARNING: state file for session $sess does not exists: $stateFile\n";
+		$state = "UNKNOWN";
 	}
 	else
 	{
diff --git a/x2goserver/sbin/x2golistsessions_root b/x2goserver/sbin/x2golistsessions_root
index 4fb27ea..3efdc43 100755
--- a/x2goserver/sbin/x2golistsessions_root
+++ b/x2goserver/sbin/x2golistsessions_root
@@ -50,7 +50,8 @@ sub get_agent_state
 	my $stateFile = "/tmp/.x2go-".$user."/C-".$sess."/state";
 	if (! -e $stateFile )
 	{
-		die "state file not exists: $stateFile\n";
+		print "state file for session $sess does not exists: $stateFile\n";
+		$state="UNKNOWN";
 	}
 	else
 	{

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


More information about the x2go-commits mailing list