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
This commit is contained in:
lissav 2010-09-21 11:23:07 +00:00
parent 4dbfae329b
commit 30fdb83093

View File

@ -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);
}
}
}