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:
lissav 2010-11-29 13:46:37 +00:00
parent e657918601
commit 9604f628ce
2 changed files with 7 additions and 7 deletions

View File

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

View File

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