[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gforge-commits] gforge/deb-specific fix-mailing-lists.pl, 1.3, 1.4 db-u
From: |
cbayle |
Subject: |
[Gforge-commits] gforge/deb-specific fix-mailing-lists.pl, 1.3, 1.4 db-upgrade.pl, 1.51, 1.52 cvs_dump.pl, 1.1, 1.2 prepare-vhosts-file.pl, 1.3, 1.4 |
Date: |
Sun, 18 Apr 2004 07:55:04 -0500 |
Update of /cvsroot/gforge/gforge/deb-specific
In directory db.perdue.net:/tmp/cvs-serv13880/deb-specific
Modified Files:
fix-mailing-lists.pl db-upgrade.pl cvs_dump.pl
prepare-vhosts-file.pl
Log Message:
Try to fix problems when dbuser and dbname are not gforge in debian install
Index: fix-mailing-lists.pl
===================================================================
RCS file: /cvsroot/gforge/gforge/deb-specific/fix-mailing-lists.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- fix-mailing-lists.pl 28 Mar 2004 19:49:29 -0000 1.3
+++ fix-mailing-lists.pl 18 Apr 2004 12:55:02 -0000 1.4
@@ -10,7 +10,7 @@
use diagnostics ;
use File::Temp qw/ :mktemp /;
-use vars qw/ $dbh $sys_lists_host $sys_dbname $domain_name / ;
+use vars qw/ $dbh $sys_lists_host $sys_dbname $sys_dbuser $sys_dbpasswd
$domain_name / ;
use vars qw// ;
@@ -18,7 +18,11 @@
require ("/etc/gforge/local.pl") ;
+if ( "$sys_dbname" ne "gforge" || "$sys_dbuser" ne "gforge" ) {
+$dbh ||=
DBI->connect("DBI:Pg:dbname=$sys_dbname","$sys_dbuser","$sys_dbpasswd");
+} else {
$dbh ||= DBI->connect("DBI:Pg:dbname=$sys_dbname");
+}
die "Cannot connect to database: $!" if ( ! $dbh );
$dbh->{AutoCommit} = 0;
Index: db-upgrade.pl
===================================================================
RCS file: /cvsroot/gforge/gforge/deb-specific/db-upgrade.pl,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- db-upgrade.pl 28 Mar 2004 19:46:50 -0000 1.51
+++ db-upgrade.pl 18 Apr 2004 12:55:02 -0000 1.52
@@ -33,7 +33,11 @@
debug "You'll see some debugging info during this installation." ;
debug "Do not worry unless told otherwise." ;
+if ( "$sys_dbname" ne "gforge" || "$sys_dbuser" ne "gforge" ) {
+$dbh ||=
DBI->connect("DBI:Pg:dbname=$sys_dbname","$sys_dbuser","$sys_dbpasswd");
+} else {
$dbh ||= DBI->connect("DBI:Pg:dbname=$sys_dbname");
+}
die "Cannot connect to database: $!" if ( ! $dbh );
# debug "Connected to the database OK." ;
Index: cvs_dump.pl
===================================================================
RCS file: /cvsroot/gforge/gforge/deb-specific/cvs_dump.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cvs_dump.pl 28 Mar 2004 20:27:55 -0000 1.1
+++ cvs_dump.pl 18 Apr 2004 12:55:02 -0000 1.2
@@ -18,7 +18,11 @@
if($verbose) {print ("\nConnecting to database");}
+if ( "$sys_dbname" ne "gforge" || "$sys_dbuser" ne "gforge" ) {
+$dbh ||=
DBI->connect("DBI:Pg:dbname=$sys_dbname","$sys_dbuser","$sys_dbpasswd");
+} else {
$dbh ||= DBI->connect("DBI:Pg:dbname=$sys_dbname");
+}
die "Cannot connect to database: $!" if ( ! $dbh );
if($verbose) {print ("\nGetting group list");}
Index: prepare-vhosts-file.pl
===================================================================
RCS file: /cvsroot/gforge/gforge/deb-specific/prepare-vhosts-file.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- prepare-vhosts-file.pl 28 Mar 2004 19:47:45 -0000 1.3
+++ prepare-vhosts-file.pl 18 Apr 2004 12:55:02 -0000 1.4
@@ -3,7 +3,7 @@
use DBI;
use File::Temp ;
use strict ;
-use vars qw/$dbh $ifile $ofile @ilist %hash $key $val $cur $line $dbh
$sys_dbname $token/ ;
+use vars qw/$dbh $ifile $ofile @ilist %hash $key $val $cur $line $dbh
$sys_dbname $sys_dbuser $sys_dbpasswd $token/ ;
require("/etc/gforge/local.pl"); # Include all the predefined functions
@@ -18,7 +18,11 @@
}
close CONF ;
+if ( "$sys_dbname" ne "gforge" || "$sys_dbuser" ne "gforge" ) {
+$dbh ||=
DBI->connect("DBI:Pg:dbname=$sys_dbname","$sys_dbuser","$sys_dbpasswd");
+} else {
$dbh ||= DBI->connect("DBI:Pg:dbname=$sys_dbname");
+}
die "Cannot connect to database: $!" if ( ! $dbh );
$ifile = '/etc/gforge/templates/httpd.vhosts' ;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gforge-commits] gforge/deb-specific fix-mailing-lists.pl, 1.3, 1.4 db-upgrade.pl, 1.51, 1.52 cvs_dump.pl, 1.1, 1.2 prepare-vhosts-file.pl, 1.3, 1.4,
cbayle <=
- Prev by Date:
[Gforge-commits] gforge/www/include/languages SimplifiedChinese.tab, 1.14, 1.15
- Next by Date:
[Gforge-commits] gforge/debian gforge-dns-bind9.cron.d, 1.3, 1.4 changelog, 1.374, 1.375
- Previous by thread:
[Gforge-commits] gforge/www/include/languages SimplifiedChinese.tab, 1.14, 1.15
- Next by thread:
[Gforge-commits] gforge/debian gforge-dns-bind9.cron.d, 1.3, 1.4 changelog, 1.374, 1.375
- Index(es):