setup odbc for mysql on debian/ubuntu
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15571 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
029df230d6
commit
c9778bf3f7
@ -1425,6 +1425,9 @@ sub setupODBC
|
||||
#
|
||||
# for all OS need unixODBC rpm
|
||||
my $cmd = "rpm -qa | grep unixODBC";
|
||||
if ( $::debianflag ){
|
||||
$cmd = "dpkg -l | grep unixodbc";
|
||||
}
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
@ -1447,6 +1450,16 @@ sub setupODBC
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
elsif ( $::debianflag ){
|
||||
$cmd = "dpkg -l | grep libmyodbc";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
my $message = "\nlibmyodbc is not installed.";
|
||||
xCAT::MsgUtils->message("E", " $cmd failed. $message");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else # sles
|
||||
{
|
||||
$cmd = "rpm -qa | grep mysql-client";
|
||||
@ -1520,6 +1533,12 @@ sub setupODBC
|
||||
$cmd = "rpm -ql mysql-connector-odbc | grep libmyodbc..so";
|
||||
@rpmoutput = xCAT::Utils->runcmd($cmd, 0);
|
||||
}
|
||||
elsif ( $::debianflag ){
|
||||
$odbcinstfile = "/etc/odbcinst.ini";
|
||||
$odbcfile = "/etc/odbc.ini";
|
||||
$cmd = "dpkg -L libmyodbc | grep libmyodbc.so";
|
||||
@rpmoutput = xCAT::Utils->runcmd($cmd, 0);
|
||||
}
|
||||
else
|
||||
{ #sles
|
||||
$odbcinstfile = "/etc/unixODBC/odbcinst.ini ";
|
||||
|
Loading…
Reference in New Issue
Block a user