From 709cd8c0acdfcf44f30c4c4757b6d57cdda03914 Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 29 Aug 2012 13:50:56 +0000 Subject: [PATCH] add check for perl-DBD-Pg installed git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13634 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/pgsqlsetup | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/xCAT-client/bin/pgsqlsetup b/xCAT-client/bin/pgsqlsetup index 62358c32b..18316ad8e 100755 --- a/xCAT-client/bin/pgsqlsetup +++ b/xCAT-client/bin/pgsqlsetup @@ -138,6 +138,18 @@ else } +# +# check to see if perl-DBD-Pg is installed +# +my $cmd = "rpm -qa | grep perl-DBD-Pg"; +my @output=xCAT::Utils->runcmd($cmd, 0); +if ($::RUNCMD_RC != 0) +{ + my $message = + "\nperl-DBD-Pg is not installed. If on AIX, it should be first obtained from the xcat dependency tarballs and installed before running this command.\n If on Linux, install from the OS CDs."; + xCAT::MsgUtils->message("E", " $cmd failed. $message"); + exit(1); +} # # check to see if postgresql is installed # @@ -151,6 +163,7 @@ if ($::RUNCMD_RC != 0) exit(1); } # check if 9.X release, setup different +# check if 9.X release, setup different if (grep(/postgresql9/, @output)) { # postgresql 9.x # figure out which 9.x release and build path my @parseout= split(/\-/, $output[0]);