[X2Go-Commits] [x2goserver] 01/01: x2goserver.spec: also add fix to the perl-X2Go-Server-DB package.

git-admin at x2go.org git-admin at x2go.org
Sat Feb 7 02:04:37 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 ed3c35a158a568b8ea1919c8726eee2eddad1d21
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sat Feb 7 02:04:27 2015 +0100

    x2goserver.spec: also add fix to the perl-X2Go-Server-DB package.
---
 x2goserver.spec |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/x2goserver.spec b/x2goserver.spec
index d4ab9a1..36bbede 100644
--- a/x2goserver.spec
+++ b/x2goserver.spec
@@ -540,7 +540,8 @@ fi
 
 %post -n perl-X2Go-Server-DB
 # Initialize the session database
-if [ ! -s %{_localstatedir}/lib/x2go/x2go_sessions ]; then
+# ... only, if the DB does not exist OR (it exists AND the file is empty)
+if [ ! -e %{_localstatedir}/lib/x2go/x2go_sessions ] || ( [ -e %{_localstatedir}/lib/x2go/x2go_sessions ] && [ ! -s %{_localstatedir}/lib/x2go/x2go_sessions ] ); then
   if [ -x %{_sbindir}/x2godbadmin ]; then
     if grep -E "^backend=sqlite.*" /etc/x2go/x2gosql/sql 1>/dev/null 2>&1; then
       %{_sbindir}/x2godbadmin --createdb 1>/dev/null 2>&1 || :

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


More information about the x2go-commits mailing list