From 1dfc9549b1f38ff893e325157ac928e736d61de0 Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 29 Oct 2010 11:59:22 +0000 Subject: [PATCH] fix for defect 3097641 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7972 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/db2sqlsetup | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/xCAT-client/bin/db2sqlsetup b/xCAT-client/bin/db2sqlsetup index 8ebdcff86..d3540151e 100755 --- a/xCAT-client/bin/db2sqlsetup +++ b/xCAT-client/bin/db2sqlsetup @@ -1200,7 +1200,12 @@ sub setupODBC } # setup the odbcinst.ini file - my $sharedlib = "/var/lib/db2/sqllib/lib/libdb2.so"; + my $sharedlib; + if ($::osname eq 'AIX') { + $sharedlib = "/var/lib/db2/sqllib/lib/libdb2.so"; + } else { + $sharedlib="/var/lib/db2/sqllib/lib/libdb2o.so"; + } $cmd = "fgrep -i driver $odbcinstfile "; xCAT::Utils->runcmd($cmd, -1); if ($::RUNCMD_RC != 0) # then driver entry not there @@ -1233,6 +1238,16 @@ sub setupODBC xCAT::MsgUtils->message("E", "$message"); exit(1); } + $entry = "Threading = 0"; + $cmd = "echo \"$entry\" >> $odbcinstfile"; + xCAT::Utils->runcmd($cmd, 0); + if ($::RUNCMD_RC != 0) + { + $message = "$cmd failed. Could not setup $odbcinstfile."; + xCAT::MsgUtils->message("E", "$message"); + exit(1); + } + } else { # entry already there