From 30fdb83093c19cc4d8498a0d67820ab9b6bf91d7 Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 21 Sep 2010 11:23:07 +0000 Subject: [PATCH] add update of ld.so.conf with db2 library path for Linux git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7559 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/db2sqlsetup | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/xCAT-server/sbin/db2sqlsetup b/xCAT-server/sbin/db2sqlsetup index 8421fc769..976c2de62 100755 --- a/xCAT-server/sbin/db2sqlsetup +++ b/xCAT-server/sbin/db2sqlsetup @@ -827,7 +827,7 @@ sub rundb2cmd =head3 setupdb2env - Setup the db2 environment variables for root + Setup the db2 environment variables and libpaths =cut @@ -872,6 +872,22 @@ sub setupdb2env close FILE; } + my $path = $::installdb2dir; + $path .="\/lib64"; + # add path of db2 libraries to ld.so.conf + my $cmd = "egrep -i \"V9.7\" /etc/ld.so.conf"; + xCAT::Utils->runcmd($cmd, -1); + if ($::RUNCMD_RC != 0) + { # if not already there + open(FILE, ">>/etc/ld.so.conf") + or die "cannot open file /etc/ld.so.conf\n"; + print FILE "$path\n"; + close FILE; + $cmd = "ldconfig"; + xCAT::Utils->runcmd($cmd); + + } + } }