[X2Go-Commits] [x2goserver] 01/01: backport a fix from release/4.0.1.x branch in x2goserver.spec: Don't let creation of x2gouser fail if it already exists.

git-admin at x2go.org git-admin at x2go.org
Fri Jan 30 06:47:48 CET 2015


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

x2go pushed a commit to branch master
in repository x2goserver.

commit a8054f67b66a214f76366914b0ce923d961e7773
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Jan 30 06:47:41 2015 +0100

    backport a fix from release/4.0.1.x branch in x2goserver.spec: Don't let creation of x2gouser fail if it already exists.
---
 x2goserver.spec |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/x2goserver.spec b/x2goserver.spec
index 5cd667b..255f6d0 100644
--- a/x2goserver.spec
+++ b/x2goserver.spec
@@ -459,10 +459,13 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/x2gofm.desktop
 
 
 %pre common
-getent group x2gouser 1>/dev/null || groupadd -r x2gouser
+if getent group x2gouser 1>/dev/null; then
+    groupadd -r x2gouser
+fi
+if getent passwd x2gouser >/dev/null; then
     useradd -r -g x2gouser -d %{_localstatedir}/lib/x2go -s /sbin/nologin \
-    -c "x2go" x2gouser
-exit 0
+            -c "x2go" x2gouser
+fi
 
 %post
 # Initialize the session database

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


More information about the x2go-commits mailing list