diff --git a/xCAT-client/bin/mysqlsetup b/xCAT-client/bin/mysqlsetup index 188477035..f9595d0e5 100755 --- a/xCAT-client/bin/mysqlsetup +++ b/xCAT-client/bin/mysqlsetup @@ -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 ";