From 673c9a837d9851a073fdd844c2d8bcc1bb973d8f Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 30 Dec 2010 13:10:12 +0000 Subject: [PATCH] fix defect 3145930 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8536 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/db2sqlsetup | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/xCAT-client/bin/db2sqlsetup b/xCAT-client/bin/db2sqlsetup index df88bdddf..909fa4c4e 100755 --- a/xCAT-client/bin/db2sqlsetup +++ b/xCAT-client/bin/db2sqlsetup @@ -381,10 +381,13 @@ if (($::INIT) && ($::xcatrunningdb2 == 0)) # if ($::SERVER) { - &restorexcatdb; + if ($::xcatrunningdb2 == 0) # if not already running on db2 + { + &restorexcatdb; + } xCAT::MsgUtils->message("I", - "xCAT is now running on the DB2 database.\n"); + "xCAT is running on the DB2 database.\n"); } else # client @@ -504,12 +507,7 @@ sub backupxcatdb { - # If there is no backup or the /etc/xcat/cfgloc file does not point to - # pgsql, then we backup the database - my $sitefile = "$::backupdir/site.csv"; - if ((!(-e $sitefile)) || ($::xcatrunningdb2 == 0)) - { xCAT::MsgUtils->message( "I", "Backing up xCAT Database to $::backupdir.\nThis could take several minutes." @@ -544,7 +542,6 @@ sub backupxcatdb xCAT::MsgUtils->message("E", " $cmd failed."); exit(1); } - } }