From cf60db528c0e47c90bb3402cdea500af1add1755 Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 24 Oct 2012 17:51:40 +0000 Subject: [PATCH] a few improvements git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14112 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/pgsqlsetup | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/xCAT-client/bin/pgsqlsetup b/xCAT-client/bin/pgsqlsetup index 47a6a6622..d89b6e068 100755 --- a/xCAT-client/bin/pgsqlsetup +++ b/xCAT-client/bin/pgsqlsetup @@ -771,14 +771,15 @@ sub pgstart # check to see if running before continuing my $retries =0; my $pgstarted =0; + if (defined($::postgres9)) { # set to the PTF level of postgresql 9.X + $cmd = "service postgresql-9.$::postgres9 status"; + } else { + $cmd = "service postgresql status"; + } while ($retries < 30) { $retries++; - if (defined($::postgres9)) { # set to the PTF level of postgresql 9.X - $cmd = "service postgresql-9.$::postgres9 status"; - } else { - $cmd = "service postgresql status"; - } my @status=xCAT::Utils->runcmd($cmd, -1); + #my @status=xCAT::Utils->runcmd($cmd, 0); if (grep(/running/, @status)) { $pgstarted=1; last; @@ -928,7 +929,7 @@ sub setupxcatdb my $errmsg = $result[1]; $pgsql->soft_close(); xCAT::MsgUtils->message("E", - "Failed creating xcatadm id. $errmsg"); + "Failed creating xcatadm id."); exit(1); }