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]);