From 78e217be9680dceff0e25b091010dc1a371dd882 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 10 Feb 2011 13:34:38 +0000 Subject: [PATCH] fixes for defect 3176647 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8813 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/db2sqlsetup | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xCAT-client/bin/db2sqlsetup b/xCAT-client/bin/db2sqlsetup index 1cbc2c174..bd2b3d684 100755 --- a/xCAT-client/bin/db2sqlsetup +++ b/xCAT-client/bin/db2sqlsetup @@ -951,6 +951,17 @@ sub setupdb2env sub db2start { + # check to see if xcatdb instance is already running + my $cmd = "ps -ef | grep xcatdb"; + my @output = xCAT::Utils->runcmd($cmd, 0); + if ($::RUNCMD_RC == 0) # already running + { + my $db2check = "db2sysc"; # see if really running + if (grep(/$db2check/, @output)) + { + return; + } + } xCAT::MsgUtils->message("I", "Starting the DB2 Server"); my $cmd;