From 0317dd05bff1a2201d40b9442470f796d8f79490 Mon Sep 17 00:00:00 2001 From: lissav Date: Mon, 9 Jul 2012 13:42:10 +0000 Subject: [PATCH] fix defect 3540076 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@13254 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/pgsqlsetup | 48 +++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/xCAT-client/bin/pgsqlsetup b/xCAT-client/bin/pgsqlsetup index c21093156..ec5512e1c 100755 --- a/xCAT-client/bin/pgsqlsetup +++ b/xCAT-client/bin/pgsqlsetup @@ -242,38 +242,38 @@ if (($::INIT) && ($::xcatrunningpgsql == 0)) exit(1); } - # PostgreSQL not running, then initialize the database + + # Add postgres user and group and xcatadm for AIX + # create the /var/lib/pgsql data directory and set permissions. + # All this is done on Linux install automatically: + # postgres is created on Linux and xcatadm does not need to be a + # real userid on Linux. Also directory permissions are correct on Linux + # + if ($::osname eq 'AIX') + { + &mkpgusers; + } + + # + # Init Pg database and setup pg_hba.conf and postgresql.conf + # + &initpgdb; + + # PostgreSQL not running if ($::pgsqlrunning == 0) { - - # Add postgres user and group and xcatadm for AIX - # create the /var/lib/pgsql data directory and set permissions. - # All this is done on Linux install automatically: - # postgres is created on Linux and xcatadm does not need to be a - # real userid on Linux. Also directory permissions are correct on Linux - # - if ($::osname eq 'AIX') - { - &mkpgusers; - } - - # - # Init Pg database and setup pg_hba.conf and postgresql.conf - # - &initpgdb; - # # Start Postgresql server # &pgstart; - - # - # Setup Postgresql to restart on reboot - # - #&pgreboot; - } + # + # Setup Postgresql to restart on reboot + # + &pgreboot; + + # if xcat not already configured to run Postgresql add xCAT database if ($::xcatrunningpgsql == 0) {