no support for sqlite
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7273 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
cb0d6e4775
commit
56a369164b
@ -90,6 +90,11 @@ my @sqlfilelist = xCAT::Table->get_filelist($directory, \@filearray, "sql");
|
||||
|
||||
# determine database
|
||||
my $xcatcfg = xCAT::Table->get_xcatcfg();
|
||||
if ($xcatcfg =~ /^SQLite:/)
|
||||
{
|
||||
xCAT::MsgUtils->message("SE",
|
||||
"The runsqlcmd does not support the SQLite database.");
|
||||
}
|
||||
foreach my $file (@sqlfilelist)
|
||||
{
|
||||
if ($xcatcfg =~ /^DB2:/)
|
||||
@ -106,12 +111,14 @@ foreach my $file (@sqlfilelist)
|
||||
}
|
||||
if ($xcatcfg =~ /^SQLite:/)
|
||||
{
|
||||
# not supported but will leave routine in case we change our mind
|
||||
&runsqlitecmd($file,$xcatcfg);
|
||||
exit 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exit;
|
||||
exit 0;
|
||||
|
||||
#####################################
|
||||
# subroutines
|
||||
@ -131,10 +138,10 @@ sub usage
|
||||
{
|
||||
xCAT::MsgUtils->message(
|
||||
'I',
|
||||
"Usage:\nrunsqlcmd - runs the sql commands in files located in /opt/xcat/lib/perl/xCAT_schema by default or the directory input with -d or the list of files input with the -f flag."
|
||||
"Usage:\nRuns the sql commands in files located in /opt/xcat/lib/perl/xCAT_schema by default or the directory input with -d or the list of files input with the -f flag. Supports DB2,PostgreSQL,MySQL."
|
||||
);
|
||||
my $msg =
|
||||
"runsqlcmd <-h|--help>\n <-v|--version>\n <-d|--dir>\n <-f|--files>\n";
|
||||
"runsqlcmd <-h|--help>\n <-v|--version>\n <-d|--dir>\n <-f|--files>\n";
|
||||
|
||||
xCAT::MsgUtils->message('I', "$msg");
|
||||
}
|
||||
@ -285,10 +292,6 @@ sub runsqlitecmd
|
||||
{
|
||||
my $file = shift;
|
||||
my $xcatcfg = shift;
|
||||
my ($front, $back) = split('\;', $xcatcfg);
|
||||
my ($prefix, $dbname) = split('=', $front);
|
||||
my ($host, $admin, $passwd) = split('\|', $back);
|
||||
my ($hostind, $hostname) = split('=', $host);
|
||||
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user