From 1689390cc39eb824df63c8b6fd67cb458b8d040f Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 18 Oct 2012 16:23:04 +0000 Subject: [PATCH] wait up to 30 seconds for postgresql to start before trying to create the database git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14052 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/pgsqlsetup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-client/bin/pgsqlsetup b/xCAT-client/bin/pgsqlsetup index 5d368b50d..47a6a6622 100755 --- a/xCAT-client/bin/pgsqlsetup +++ b/xCAT-client/bin/pgsqlsetup @@ -771,7 +771,7 @@ sub pgstart # check to see if running before continuing my $retries =0; my $pgstarted =0; - while ($retries < 3) { + while ($retries < 30) { $retries++; if (defined($::postgres9)) { # set to the PTF level of postgresql 9.X $cmd = "service postgresql-9.$::postgres9 status"; @@ -783,7 +783,7 @@ sub pgstart $pgstarted=1; last; } - sleep 10; + sleep 1; } if ($pgstarted ==0) { # failed to started xCAT::MsgUtils->message("E", " service postgresql start failed.");