From ffb252217c35ab23dd871c75ad0ce4bf8ecd97f5 Mon Sep 17 00:00:00 2001 From: lissav Date: Sun, 6 Feb 2011 12:35:49 +0000 Subject: [PATCH] fix so you can migrate between mysql/db2/pgsql git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8794 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/pgsqlsetup | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xCAT-client/bin/pgsqlsetup b/xCAT-client/bin/pgsqlsetup index 51213e1b2..c18a664ff 100755 --- a/xCAT-client/bin/pgsqlsetup +++ b/xCAT-client/bin/pgsqlsetup @@ -868,7 +868,14 @@ sub createcfgloc sub restorexcatdb { - + # set the env variable for Table.pm for the new database + my $xcatcfg; + my $cfgl; + open($cfgl,"<","/etc/xcat/cfgloc"); + $xcatcfg = <$cfgl>; + close($cfgl); + chomp($xcatcfg); + # restore the database xCAT::MsgUtils->message( "I", @@ -882,7 +889,7 @@ sub restorexcatdb } # restore it - my $cmd = "XCATBYPASS=1 restorexCATdb -p $::backupdir"; + my $cmd = "XCATBYPASS=1 XCATCFG=\"$xcatcfg\" restorexCATdb -p $::backupdir"; xCAT::Utils->runcmd($cmd, 0); if ($::RUNCMD_RC != 0) {