From 66076a6ba4d899abfd64021c9a00bd0ac85c1b23 Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 9 Feb 2011 20:05:34 +0000 Subject: [PATCH] check that perl-DBD-DB2 is installed git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8808 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/db2sqlsetup | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xCAT-client/bin/db2sqlsetup b/xCAT-client/bin/db2sqlsetup index af864b021..1cbc2c174 100755 --- a/xCAT-client/bin/db2sqlsetup +++ b/xCAT-client/bin/db2sqlsetup @@ -195,6 +195,18 @@ if (!(-e ($::installdb2dir))) exit(1); } +# check to see if the perl DBD for DB2 is installed +# +my $cmd = "rpm -qa | grep perl-DBD-DB2"; +xCAT::Utils->runcmd($cmd, 0); +if ($::RUNCMD_RC != 0) +{ + my $message = + "\perl-DBD-DB2 is not installed. It should be first obtained from the xcat dependency tarballs and installed before we can setup DB2"; + xCAT::MsgUtils->message("E", " $cmd failed. $message"); + exit(1); +} + # If setting up the Server, check to see if DB2 is running $::db2running = 0; $::xcatrunningdb2 = 0;