[X2Go-Commits] x2goserver.git - release/4.0.1.x (branch) updated: 4.0.0.2-17-gbfc8a90

X2Go dev team git-admin at x2go.org
Fri Jun 7 21:22:01 CEST 2013


The branch, release/4.0.1.x has been updated
       via  bfc8a9006979c78410ee8aefc6a38fc2d6382467 (commit)
      from  0d79bd4dec2fcd834ea90fb3117c8ce7e0dbcf85 (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 bfc8a9006979c78410ee8aefc6a38fc2d6382467
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Jun 7 21:19:03 2013 +0200

    Partially revert USED_PORTS detection code back to the old-style awk-way. (Fixes: #155).
    
    Conflicts (resolved by Mike Gabriel):
    	debian/changelog

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

Summary of changes:
 debian/changelog                  |    2 ++
 x2goserver/bin/x2goresume-session |    4 ++--
 x2goserver/bin/x2gostartagent     |    4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index cfbb09e..215acc7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,8 @@ x2goserver (4.0.0.3-0~x2go1) UNRELEASED; urgency=low
     - Make pre-set DESTDIR and PREFIX traverse through all Makefiles.
       Do not include DESTDIR in Makefile-hard-coded path in x2gosqlitewrapper.
     - Make x2gomountdirs / x2goumount-session UNC path aware.
+    - Partially revert USED_PORTS detection code back to the old-style awk-way.
+      (Fixes: #155).
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Sun, 19 May 2013 15:02:53 +0200
 
diff --git a/x2goserver/bin/x2goresume-session b/x2goserver/bin/x2goresume-session
index f4b5624..9c2eca8 100755
--- a/x2goserver/bin/x2goresume-session
+++ b/x2goserver/bin/x2goresume-session
@@ -67,8 +67,8 @@ $X2GO_LIB_PATH/x2gosyslog "$0" "debug" "old ports: $GR_PORT, $SOUND_PORT, $FS_PO
 #Get all used in system ports from ss output
 ss=$(PATH="$PATH:/usr/sbin:/sbin" type -P ss);
 USED_PORTS=$(
-	"$ss" -lnt |
-	perl -lne 'print$d{$2}="|$2|"if/^(\S+\s+){2}\S+:(\d+)/&&!exists$d{$2}';
+	"$ss" -nt -all |
+	awk '{ n=split($0,lines,"\n"); for(i=1;i<=n;i++){split (lines[i],words," ");delim=split(words[4],ports,":"); if(delim>1)printf ("|%s|\n",ports[delim])} }';
 );
 
 #check if saved in DB ports free
diff --git a/x2goserver/bin/x2gostartagent b/x2goserver/bin/x2gostartagent
index 83e559d..e137368 100755
--- a/x2goserver/bin/x2gostartagent
+++ b/x2goserver/bin/x2gostartagent
@@ -137,8 +137,8 @@ USED_DISPLAYS=`$X2GO_LIB_PATH/x2gogetdisplays $HOSTNAME`
 ss=$(PATH="$PATH:/usr/sbin:/sbin" type -P ss);
 USED_PORTS=$(
 	"$X2GO_LIB_PATH/x2gogetports" "$HOSTNAME";
-	"$ss" -lnt |
-	perl -lne 'print$d{$2}="|$2|"if/^(\S+\s+){2}\S+:(\d+)/&&!exists$d{$2}';
+	"$ss" -nt -all |
+	awk '{ n=split($0,lines,"\n"); for(i=1;i<=n;i++){split (lines[i],words," ");delim=split(words[4],ports,":"); if(delim>1)printf ("|%s|\n",ports[delim])} }';
 );
 
 while [ "$OUTPUT"  != "inserted" ]; do


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