[X2Go-Commits] [x2goserver] 08/08: x2goserver/{bin/x2go{runcommand, suspend-session}, sbin/x2gocleansessions}: remove hopefully redundant HOSTNAME export commands.

git-admin at x2go.org git-admin at x2go.org
Wed Nov 1 10:24:09 CET 2017


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

x2go pushed a commit to branch master
in repository x2goserver.

commit 9e5fe109444c0f9672706bd61a2d140488f77ae3
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Wed Nov 1 09:39:31 2017 +0100

    x2goserver/{bin/x2go{runcommand,suspend-session},sbin/x2gocleansessions}: remove hopefully redundant HOSTNAME export commands.
    
    Cherry-picked from release/4.0.1.x branch.
---
 debian/changelog                   |  3 +++
 x2goserver/bin/x2goruncommand      |  1 -
 x2goserver/bin/x2gosuspend-session |  1 -
 x2goserver/sbin/x2gocleansessions  | 10 +++++-----
 4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0e59b87..f7398ab 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -304,6 +304,9 @@ x2goserver (4.0.1.21-0x2go1) UNRELEASED; urgency=medium
       inserting values into database more gracefully. Fixes: #1230.
     - x2goserver/bin/x2gostartagent: write hostname errors to stderr to make
       X2Go Client (and maybe PyHoca?) fail.
+    - x2goserver/{bin/x2go{runcommand,suspend-session},
+      sbin/x2gocleansessions}: remove hopefully redundant HOSTNAME export
+      commands.
   * x2goserver.spec:
     - Add mandatory perl-generators Build-Requires as per
       https://fedoraproject.org/wiki/Changes/Build_Root_Without_Perl
diff --git a/x2goserver/bin/x2goruncommand b/x2goserver/bin/x2goruncommand
index c099ec5..676b0cf 100755
--- a/x2goserver/bin/x2goruncommand
+++ b/x2goserver/bin/x2goruncommand
@@ -420,7 +420,6 @@ x2gofeature X2GO_DESKTOPSHARING >/dev/null && x2goterminate-desktopsharing "$X2G
 
 kill -TERM  "$X2GO_AGENT_PID"
 "$X2GO_LIB_PATH/x2gochangestatus" 'F' "$X2GO_SESSION"  > /dev/null
-export HOSTNAME
 x2goumount-session "$X2GO_SESSION"
 
 # run logout scripts
diff --git a/x2goserver/bin/x2gosuspend-session b/x2goserver/bin/x2gosuspend-session
index 42047b5..2bd8d0a 100755
--- a/x2goserver/bin/x2gosuspend-session
+++ b/x2goserver/bin/x2gosuspend-session
@@ -53,7 +53,6 @@ x2gofeature X2GO_DESKTOPSHARING &>/dev/null && x2gosuspend-desktopsharing "$SESS
 # run x2goserver-extensions for pre-suspend
 x2gofeature X2GO_RUN_EXTENSIONS &>/dev/null && x2goserver-run-extensions "$SESSION_NAME" pre-suspend || true
 
-export HOSTNAME
 x2goumount-session "$SESSION_NAME"
 
 STATE=`$X2GO_LIB_PATH/x2gogetagentstate "$SESSION_NAME"`
diff --git a/x2goserver/sbin/x2gocleansessions b/x2goserver/sbin/x2gocleansessions
index dbaa7c4..74895b8 100755
--- a/x2goserver/sbin/x2gocleansessions
+++ b/x2goserver/sbin/x2gocleansessions
@@ -270,7 +270,7 @@ elsif ($pid == 0 )
 						unlink("/tmp/.X$display-lock");
 					}
 					log_message('debug', "@sinfo[1]: unmounting all shares");
-					system( "su", "@sinfo[11]", "-s", "/bin/sh", "-c", "export HOSTNAME && x2goumount-session @sinfo[1]");
+					system( "su", "@sinfo[11]", "-s", "/bin/sh", "-c", "x2goumount-session @sinfo[1]");
 					#remove port forwarding
 					system("su", "@sinfo[11]", "-s", "/bin/sh", "-c", "$x2go_lib_path/x2gormforward @sinfo[1]");
 				}
@@ -305,7 +305,7 @@ elsif ($pid == 0 )
 					unlink("/tmp/.X$display-lock");
 				}
 				log_message('debug', "@sinfo[1]: unmounting all shares");
-				system("su", "@sinfo[11]", "-s", "/bin/sh", "-c", "export HOSTNAME && x2goumount-session @sinfo[1]");
+				system("su", "@sinfo[11]", "-s", "/bin/sh", "-c", "x2goumount-session @sinfo[1]");
 			}
 			else
 			{
@@ -316,7 +316,7 @@ elsif ($pid == 0 )
 						system("su", "@sinfo[11]", "-s", "/bin/sh", "-c", "$x2go_lib_path/x2gochangestatus S @sinfo[1]");
 						log_message('debug', "@sinfo[1]: is suspended, changing status from @sinfo[4] to S");
 						log_message('debug', "@sinfo[1]: unmounting all shares");
-						system("su", "@sinfo[11]", "-s", "/bin/sh", "-c", "export HOSTNAME && x2goumount-session @sinfo[1]");
+						system("su", "@sinfo[11]", "-s", "/bin/sh", "-c", "x2goumount-session @sinfo[1]");
 						#remove port forwarding
 						system("su", "@sinfo[11]", "-s", "/bin/sh", "-c", "$x2go_lib_path/x2gormforward @sinfo[1]");
 					}
@@ -328,7 +328,7 @@ elsif ($pid == 0 )
 						# If it didn't change into suspended state by then, suspend it "forcefully".
 						if ($remembered_sessions_status_since_iterations{@sinfo[1]} == 1) {
 							log_message('debug', "@sinfo[1]: unmounting all shares");
-							system("su", "@sinfo[11]", "-s", "/bin/sh", "-c", "export HOSTNAME && x2goumount-session @sinfo[1]");
+							system("su", "@sinfo[11]", "-s", "/bin/sh", "-c", "x2goumount-session @sinfo[1]");
 							system("su", "@sinfo[11]", "-s", "/bin/sh", "-c", "x2gosuspend-session @sinfo[1]");
 							log_message('debug', "@sinfo[1]: was found running and has now been suspended");
 						}
@@ -344,7 +344,7 @@ elsif ($pid == 0 )
 					if (!session_has_terminated(@sinfo[1], at sinfo[11]))
 					{
 						log_message('debug', "@sinfo[1]: unmounting all shares");
-						system("su", "@sinfo[11]", "-s", "/bin/sh", "-c", "export HOSTNAME && x2goumount-session @sinfo[1]");
+						system("su", "@sinfo[11]", "-s", "/bin/sh", "-c", "x2goumount-session @sinfo[1]");
 						system("su", "@sinfo[11]", "-s", "/bin/sh", "-c", "x2goterminate-session @sinfo[1]");
 						log_message('debug', "@sinfo[1]: termination has been requested via the session DB");
 						#remove port forwarding

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


More information about the x2go-commits mailing list