[interchange-cvs] interchange - ton modified code/UI_Tag/xfer_catalog.coretag
interchange-core@icdevgroup.org
interchange-core@icdevgroup.org
Mon Jun 23 08:03:00 2003
User: ton
Date: 2003-06-23 12:02:33 GMT
Modified: code/UI_Tag xfer_catalog.coretag
Log:
Added missing user and password to SQL DUMP COMMAND.
Revision Changes Path
1.2 +8 -1 interchange/code/UI_Tag/xfer_catalog.coretag
rev 1.2, prev_rev 1.1
Index: xfer_catalog.coretag
===================================================================
RCS file: /var/cvs/interchange/code/UI_Tag/xfer_catalog.coretag,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- xfer_catalog.coretag 10 Apr 2003 18:04:24 -0000 1.1
+++ xfer_catalog.coretag 23 Jun 2003 12:02:33 -0000 1.2
@@ -75,6 +75,7 @@
host => '-h %s',
port => '-p %s',
user => '-u %s',
+ pass => '-p%s',
},
Pg => {
restore => $::Variable->{RESTORE_COMMAND_PG} || 'psql -q',
@@ -187,9 +188,15 @@
$dsn{$dsn} = join " ", $map->{command}, @args, $dbname;
if (my $user = $o->{USER}) {
$user{$dsn} = $user;
+ my $tpl = $map->{user};
+ $tpl =~ s/\%s/$user/g
+ and $dsn{$dsn} .= " $tpl";
}
if (my $pass = $o->{PASS}) {
$pass{$dsn} = $pass;
+ my $tpl = $map->{pass};
+ $tpl =~ s/\%s/$pass/g
+ and $dsn{$dsn} .= " $tpl";
}
}
@@ -200,7 +207,7 @@
for(keys %dsn) {
my $ext = $_ eq $::Variable->{SQLDSN} ? 'maindump' : 'dump';
my $cmd = "$dsn{$_} > xfer/dumps/$dbname{$_}.$dbtype{$_}.$ext";
-#::logDebug("executing $cmd");
+::logDebug("executing $cmd");
system $cmd;
if($?) {
my $status = $?;