mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-08-19 01:30:21 +00:00
fix update of the ODBC files when mysql and db2 on the system defect 3115036
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8277 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
@@ -1228,9 +1228,9 @@ sub setupODBC
|
||||
} else {
|
||||
$sharedlib="/var/lib/db2/sqllib/lib/libdb2o.so";
|
||||
}
|
||||
$cmd = "fgrep -i driver $odbcinstfile ";
|
||||
$cmd = "fgrep -i DB2 $odbcinstfile ";
|
||||
xCAT::Utils->runcmd($cmd, -1);
|
||||
if ($::RUNCMD_RC != 0) # then driver entry not there
|
||||
if ($::RUNCMD_RC != 0) # then DB2 entry not there
|
||||
{
|
||||
my $entry =
|
||||
"[DB2]\nDescription = ODBC for DB2\nDriver = $sharedlib";
|
||||
@@ -1278,7 +1278,7 @@ sub setupODBC
|
||||
}
|
||||
|
||||
# setup the Database and instance Name in the odbc.ini file
|
||||
$cmd = "fgrep -i XCATDB $odbcfile";
|
||||
$cmd = "fgrep -i DB2 $odbcfile";
|
||||
xCAT::Utils->runcmd($cmd, -1);
|
||||
if ($::RUNCMD_RC != 0) # then xcat entry not there
|
||||
{
|
||||
@@ -1331,7 +1331,7 @@ sub setupODBC
|
||||
}
|
||||
else
|
||||
{ # entry already there
|
||||
$message = "$rootodbcfile already configured, will not change.";
|
||||
$message = "$rootodbcfile already configured, will not change. Check to see if rootid and password are correct for DB2";
|
||||
xCAT::MsgUtils->message("I", "$message");
|
||||
}
|
||||
|
||||
|
@@ -1451,7 +1451,7 @@ sub setupODBC
|
||||
|
||||
# setup the odbcinst.ini file
|
||||
my $sharedlib = $rpmoutput[0];
|
||||
$cmd = "fgrep -i driver $odbcinstfile ";
|
||||
$cmd = "fgrep -i MySQL $odbcinstfile ";
|
||||
xCAT::Utils->runcmd($cmd, -1);
|
||||
if ($::RUNCMD_RC != 0) # then driver entry not there
|
||||
{
|
||||
@@ -1473,7 +1473,7 @@ sub setupODBC
|
||||
}
|
||||
|
||||
# setup the DSN odbc.ini file
|
||||
$cmd = "fgrep -i XCATDB $odbcfile";
|
||||
$cmd = "fgrep -i MySQL $odbcfile";
|
||||
xCAT::Utils->runcmd($cmd, -1);
|
||||
if ($::RUNCMD_RC != 0) # then xcat entry not there
|
||||
{
|
||||
@@ -1528,7 +1528,7 @@ sub setupODBC
|
||||
}
|
||||
else
|
||||
{ # entry already there
|
||||
$message = "$rootodbcfile already configured, will not change.";
|
||||
$message = "$rootodbcfile already configured, will not change. Make sure the userid and password are correct for MySQL";
|
||||
xCAT::MsgUtils->message("I", "$message");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user