This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch feature/mysql-backend in repository x2goserver. at a4f7c88 x2goserver/sbin/x2godbadmin: use global variable instead of hardcoded string (since the global variable is used latter on anyway). This branch includes the following new commits: new d6f7a95 x2goserver/sbin/x2godbadmin: whitespace only. new a4f7c88 x2goserver/sbin/x2godbadmin: use global variable instead of hardcoded string (since the global variable is used latter on anyway). The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch feature/mysql-backend in repository x2goserver. commit a4f7c88b32273d4414522800a70565a9a6c76f20 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Feb 22 05:07:06 2018 +0100 x2goserver/sbin/x2godbadmin: use global variable instead of hardcoded string (since the global variable is used latter on anyway). --- debian/changelog | 2 ++ x2goserver/sbin/x2godbadmin | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 3597721..ac0b2ca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -60,6 +60,8 @@ x2goserver (4.1.0.1-0x2go1) UNRELEASED; urgency=medium ${PREFIX}/lib/. File should not be modified by users. - x2goserver-common/: move etc/tmpfiles.d to lib/tmpfiles.d. - x2goserver/sbin/x2godbadmin: whitespace only. + - x2goserver/sbin/x2godbadmin: use global variable instead of hardcoded + string (since the global variable is used latter on anyway). * debian/{control,compat}: + Bump DH compat level to 9. * debian/: diff --git a/x2goserver/sbin/x2godbadmin b/x2goserver/sbin/x2godbadmin index 9e5d3c2..4eab3e9 100755 --- a/x2goserver/sbin/x2godbadmin +++ b/x2goserver/sbin/x2godbadmin @@ -708,7 +708,7 @@ sub create_database { my $dbh=DBI->connect("dbi:Pg:dbname=postgres;host=$host;port=$port;sslmode=$sslmode", "$dbadmin", "$dbadminpass",{AutoCommit => 1}) or die $_; #drop db if exists - my $sth=$dbh->prepare("drop database if exists x2go_sessions"); + my $sth=$dbh->prepare("drop database if exists $db"); $sth->execute(); #drop x2goadmin $sth=$dbh->prepare("drop user if exists $x2goadmin"); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch feature/mysql-backend in repository x2goserver. commit d6f7a95b5c36f1df66ac8871a7e072cecb1a0f93 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Feb 22 05:01:53 2018 +0100 x2goserver/sbin/x2godbadmin: whitespace only. --- debian/changelog | 1 + x2goserver/sbin/x2godbadmin | 62 ++++++++++++++++++++++----------------------- 2 files changed, 31 insertions(+), 32 deletions(-) diff --git a/debian/changelog b/debian/changelog index 99c85fb..3597721 100644 --- a/debian/changelog +++ b/debian/changelog @@ -59,6 +59,7 @@ x2goserver (4.1.0.1-0x2go1) UNRELEASED; urgency=medium - x2goserver-common/Makefile: stage tmpfiles.d config file into ${PREFIX}/lib/. File should not be modified by users. - x2goserver-common/: move etc/tmpfiles.d to lib/tmpfiles.d. + - x2goserver/sbin/x2godbadmin: whitespace only. * debian/{control,compat}: + Bump DH compat level to 9. * debian/: diff --git a/x2goserver/sbin/x2godbadmin b/x2goserver/sbin/x2godbadmin index 30f63f6..9e5d3c2 100755 --- a/x2goserver/sbin/x2godbadmin +++ b/x2goserver/sbin/x2godbadmin @@ -77,11 +77,10 @@ if ($Config->param("backend") eq 'sqlite') { if ( ! -e $dbfile) { - $createdb = 1; - - } else { - + } + else + { # Update the session DB file my $dbh=DBI->connect("dbi:SQLite:dbname=$dbfile","","",{AutoCommit => 1, PrintError => 0, PrintWarn => 1, RaiseError => 1 }) or die $_; my $coltest; @@ -92,11 +91,11 @@ if ($Config->param("backend") eq 'sqlite') $dbh->prepare(" select tekictrl_port from sessions "); - } catch { + } + catch + { print "ADDING: tekictrl_port column to table sessions\n"; - $sth=$dbh->prepare(" - alter table sessions add column 'tekictrl_port' int - "); + $sth=$dbh->prepare("alter table sessions add column 'tekictrl_port' int"); $sth->execute(); $sth->finish(); }; @@ -104,14 +103,12 @@ if ($Config->param("backend") eq 'sqlite') # Update missing column on sessions table: tekidata_port try { - $dbh->prepare(" - select tekidata_port from sessions - "); - } catch { + $dbh->prepare("select tekidata_port from sessions"); + } + catch + { print "ADDING: tekidata_port column to table sessions\n"; - $sth=$dbh->prepare(" - alter table sessions add column 'tekidata_port' int - "); + $sth=$dbh->prepare("alter table sessions add column 'tekidata_port' int"); $sth->execute(); $sth->finish(); }; @@ -165,9 +162,7 @@ if ($Config->param("backend") eq 'sqlite') $sth->execute() or die; $sth->finish(); - my $sth=$dbh->prepare(" - create table messages(mess_id varchar(20) primary key, message text) - "); + my $sth=$dbh->prepare("create table messages(mess_id varchar(20) primary key, message text)"); $sth->execute() or die; $sth->finish(); @@ -272,7 +267,8 @@ if ($updatedb) my $dbh; until ( $dbh = DBI->connect("dbi:Pg:dbname=$db;host=$host;port=$port;sslmode=$sslmode", "$dbadmin", "$dbadminpass",{AutoCommit => 1, RaiseError => 0, PrintError => 0}) - ) { + ) + { $createdb = 1; last; }; @@ -284,11 +280,11 @@ if ($updatedb) my $sth_tekidata; my $sth_update; try { - $sth_tekictrl = $dbh->prepare(" - select tekictrl_port from sessions - "); + $sth_tekictrl = $dbh->prepare("select tekictrl_port from sessions"); $sth_tekictrl->execute(); - } catch { + } + catch + { print "ADDING: tekictrl_port column to table sessions\n"; $sth_tekictrl = $dbh->prepare(" alter table sessions @@ -299,11 +295,11 @@ if ($updatedb) $update_views_n_rules = 1; }; try { - $sth_tekidata = $dbh->prepare(" - select tekidata_port from sessions - "); + $sth_tekidata = $dbh->prepare("select tekidata_port from sessions"); $sth_tekidata->execute(); - } catch { + } + catch + { print "ADDING: tekidata_port column to table sessions\n"; $sth_tekidata=$dbh->prepare(" alter table sessions @@ -350,7 +346,9 @@ if ($updatedb) undef $dbh; } exit(0); - } else { + } + else + { print "No session DB found. Use --createdb instead of --updatedb.\n"; } } @@ -457,7 +455,9 @@ sub add_user() { print "Cannot find user ($user)\n"; return; - } elsif ($name eq "root") { + } + elsif ($name eq "root") + { print "The super-user \"root\" is not allowed to use X2Go\n"; return; } @@ -604,9 +604,7 @@ sub create_tables() "); $sth->execute() or die; - $sth=$dbh->prepare(" - create table messages(mess_id varchar(20) primary key, message text) - "); + $sth=$dbh->prepare("create table messages(mess_id varchar(20) primary key, message text)"); $sth->execute() or die; $sth=$dbh->prepare(" -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goserver.git