From: rettenbe Date: Wed, 5 Mar 2008 13:38:49 +0000 (+0000) Subject: new check scripts for gosa-si dbs X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a0355c65d8be7802a5f35b493ec52e026753fded;p=gosa.git new check scripts for gosa-si dbs git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9357 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/tests/sqlite-check-fai.pl b/gosa-si/tests/sqlite-check-fai.pl new file mode 100755 index 000000000..4d04279de --- /dev/null +++ b/gosa-si/tests/sqlite-check-fai.pl @@ -0,0 +1,58 @@ +#!/usr/bin/perl +#=============================================================================== +# +# FILE: DBD-SQlite.pl +# +# USAGE: ./DBD-SQlite.pl +# +# DESCRIPTION: +# +# OPTIONS: --- +# REQUIREMENTS: --- +# BUGS: --- +# NOTES: --- +# AUTHOR: (), <> +# COMPANY: +# VERSION: 1.0 +# CREATED: 20.12.2007 08:54:52 CET +# REVISION: --- +#=============================================================================== + +use strict; +use warnings; +use GOSA::DBsqlite; +use Data::Dumper; + +print "START\n"; +my $res; +my $db_name; + +$db_name = "/var/lib/gosa-si/fai.db"; +if (-e $db_name) { + print "\n############################################################\n"; + my $table_name = "fai_server"; + print "$db_name\n"; + print "$table_name\n"; + + my $sqlite = GOSA::DBsqlite->new($db_name); + my $col_names = $sqlite->get_table_columns($table_name); + print join(', ', @{ $col_names } )."\n" ; + my $answer = $sqlite->show_table($table_name); + print $answer."\n"; +} + +$db_name = "/var/lib/gosa-si/fai.db"; +if (-e $db_name) { + print "\n############################################################\n"; + my $table_name = "fai_release"; + print "$db_name\n"; + print "$table_name\n"; + + my $sqlite = GOSA::DBsqlite->new($db_name); + my $col_names = $sqlite->get_table_columns($table_name); + print join(', ', @{ $col_names } )."\n" ; + my $answer = $sqlite->show_table($table_name); + print $answer."\n"; +} + +print "\nFINISH\n"; diff --git a/gosa-si/tests/sqlite-check-packages-list.pl b/gosa-si/tests/sqlite-check-packages-list.pl new file mode 100755 index 000000000..d01644e19 --- /dev/null +++ b/gosa-si/tests/sqlite-check-packages-list.pl @@ -0,0 +1,46 @@ +#!/usr/bin/perl +#=============================================================================== +# +# FILE: sqlite_check_packages_list.pl +# +# USAGE: ./sqlite_check_packages_list.pl +# +# DESCRIPTION: +# +# OPTIONS: --- +# REQUIREMENTS: --- +# BUGS: --- +# NOTES: --- +# AUTHOR: (), <> +# COMPANY: +# VERSION: 1.0 +# CREATED: 28.02.2008 11:09:15 CET +# REVISION: --- +#=============================================================================== + +use strict; +use warnings; +use GOSA::DBsqlite; +use Data::Dumper; + +print "START\n"; +my $res; +my $db_name; + + +$db_name = "/var/lib/gosa-si/packages.db"; +if (-e $db_name) { + print "\n############################################################\n"; + my $table_name = "packages_list"; + print "$db_name\n"; + print "$table_name\n"; + + my $sqlite = GOSA::DBsqlite->new($db_name); + my $col_names = $sqlite->get_table_columns($table_name); + print join(', ', @{ $col_names } )."\n" ; + my $answer = $sqlite->show_table($table_name); + print $answer."\n"; +} + + +print "\nFINISH\n"; diff --git a/gosa-si/tests/sqlite-check-server.pl b/gosa-si/tests/sqlite-check-server.pl index 5b1533167..0940a30e7 100755 --- a/gosa-si/tests/sqlite-check-server.pl +++ b/gosa-si/tests/sqlite-check-server.pl @@ -101,18 +101,4 @@ if (-e $db_name) { print $answer."\n"; } -$db_name = "/var/lib/gosa-si/fai.db"; -if (-e $db_name) { - print "\n############################################################\n"; - my $table_name = "fai_release"; - print "$db_name\n"; - print "$table_name\n"; - - my $sqlite = GOSA::DBsqlite->new($db_name); - my $col_names = $sqlite->get_table_columns($table_name); - print join(', ', @{ $col_names } )."\n" ; - my $answer = $sqlite->show_table($table_name); - print $answer."\n"; -} - print "\nFINISH\n";